Does arena_tcache_fill_small() ever end up bypassing custom chunk allocation?

D'Alessandro, Luke K ldalessa at indiana.edu
Tue Feb 10 19:52:12 PST 2015


We have an arena that we are using for a specific bit of memory that we are managing with a custom chunk allocator.

We’re seeing initial small allocations through this arena succeed without calling out to our custom chunk allocator. This behavior appears to be new since b617df8. While tracing this behavior, I’m seeing the initial allocations miss in the cache, and forward to arena_tcache_fill_small() which does some difficult-to-disect stuff including something to do with runs. After this call, the cache succeeds in supplying the allocation, without ever getting our chunk allocator involved.

This causes us issues because the memory we’re getting back doesn’t seem to come from the place we’re expecting it to come from.

Is arena_tcache_fill_small() going somewhere special to find memory that was allocated with some other chunk allocator, previous to our initialization of our arena?

Thanks in advance,
Luke


More information about the jemalloc-discuss mailing list