[PATCH] Don't fail memalign with an alignment < sizeof(void *)

Jason Evans jasone at canonware.com
Tue Feb 28 21:51:36 PST 2012

On 02/21/2012 08:21 AM, Mike Hommey wrote:
> While posix_memalign needs alignment to be a power of two and a multiple
> of sizeof(void *), memalign only requires the former.
> Combined with interposing of glibc's memalign, we can end up in situations
> where glibc calls memalign with a power of two smaller than sizeof(void *),
> and where the failure in imemalign breaks normal functionality.

I committed a different solution, with equivalent effect.  See the 
commit message for more detail about this issue if you're curious:



More information about the jemalloc-discuss mailing list