mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-24 18:55:30 +00:00
af38583e2e
The infinite loop happens if chunk_alloc_arena needs to be called when a0malloc is called. It in turn calls chunk_alloc_default, which uses tsd, which calls a0malloc if it's the first time the tsd is being gotten from the current thread. tsd only uses a0malloc on platforms where there is no native thread local storage support, which, for Mozilla, essentially means anything that is not Linux. But the tsd is only neededto get the dss precedence setting of the given arena. That setting has no effect when dss is disabled, which it is on Windows and Mac. Moreover, the default setting for dss precedence is "secondary", which means jemalloc only tries dss after it failed to get memory with mmap/VirtualAlloc. Considering the cases where mmap/VirtualAlloc would fail essentially means there is shortage of address space, sbrk() is not going to have much more success, so we might as well disable dss support on all platforms, avoiding the infinite loop problem on Android and B2G as well. |
||
---|---|---|
.. | ||
bin | ||
doc | ||
include | ||
src | ||
test | ||
autogen.sh | ||
ChangeLog | ||
config.guess | ||
config.stamp.in | ||
config.sub | ||
configure | ||
configure.ac | ||
COPYING | ||
coverage.sh | ||
INSTALL | ||
install-sh | ||
jemalloc.pc.in | ||
Makefile.in | ||
README | ||
VERSION |
jemalloc is a general purpose malloc(3) implementation that emphasizes fragmentation avoidance and scalable concurrency support. jemalloc first came into use as the FreeBSD libc allocator in 2005, and since then it has found its way into numerous applications that rely on its predictable behavior. In 2010 jemalloc development efforts broadened to include developer support features such as heap profiling, Valgrind integration, and extensive monitoring/tuning hooks. Modern jemalloc releases continue to be integrated back into FreeBSD, and therefore versatility remains critical. Ongoing development efforts trend toward making jemalloc among the best allocators for a broad range of demanding applications, and eliminating/mitigating weaknesses that have practical repercussions for real world applications. The COPYING file contains copyright and licensing information. The INSTALL file contains information on how to configure, build, and install jemalloc. The ChangeLog file contains a brief summary of changes for each release. URL: http://www.canonware.com/jemalloc/