[PATCH] Make zone_{free, realloc, free_definite_size} fallback to the system allocator if they are called with a pointer that jemalloc didn't allocate

Jason Evans jasone at canonware.com
Mon Mar 26 13:00:10 PDT 2012

On Mar 26, 2012, at 9:39 AM, Mike Hommey wrote:
> From: Mike Hommey <mh at glandium.org>
> It turns out some OSX system libraries (like CoreGraphics on 10.6) like
> to call malloc_zone_* functions, but giving them pointers that weren't
> allocated with the zone they are using.
> Possibly, they do malloc_zone_malloc(malloc_default_zone()) before we
> register the jemalloc zone, and malloc_zone_realloc(malloc_default_zone())
> after. malloc_default_zone() returning a different value in both cases.

Applied; thanks.

It's a shame that this is necessary…


More information about the jemalloc-discuss mailing list