зеркало из https://github.com/mozilla/gecko-dev.git
19448fe709
Going through the system zone allocator for every call to realloc/free on OSX is costly, because the zone allocator needs to first verify that the allocations do belong to the allocator it invokes (which ends up calling jemalloc's malloc_usable_size), which is unnecessary when we expect the allocations to belong to jemalloc. So, we export the malloc/realloc/free/etc. symbols from libmozglue.dylib, such that libraries and programs linked against it call directly into jemalloc instead of going through the system zone allocator, effectively shortcutting the allocator verification. The risk is that some things in Gecko try to realloc/free pointers it got from system libraries, if those were allocated with a system zone that is not jemalloc. --HG-- extra : rebase_source : ee0b29e1275176f52e64f4648dfa7ce25d61292e |
||
---|---|---|
.. | ||
jemalloc_config.cpp | ||
malloc_decls.h | ||
moz.build | ||
mozmemory.h | ||
mozmemory_wrap.c | ||
mozmemory_wrap.h | ||
replace_malloc.c | ||
replace_malloc.h | ||
replace_malloc_bridge.h | ||
zone.c |