Segmentation fault when a custom chunk allocator returns a memory block larger than the chunk size

Jason Evans jasone at canonware.com
Mon Jul 28 18:40:06 PDT 2014


On Jul 28, 2014, at 4:04 PM, meng <xqmeng at gmail.com> wrote:
> Yes, the address returned from the custom chunk_alloc() is got from mmap(0,2^31,...). Because 2^31 is a multiple of 2^22 (the default chunk size), it must be aligned with the chunk size.

mmap() makes no guarantees about alignment other than that the returned memory starts at a page boundary.

Jason



More information about the jemalloc-discuss mailing list