mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-10-28 16:55:15 +08:00
250120f25f6b00a34b01058cc36c7c5cd14aa52b
Starting with MALLOC_CONF=tcache:false and reading or writing thread.tcache.max before first enabling the cache dereferences NULL. The tcache_t embedded in TSD always exists, but tcache->tcache_slow is assigned only by tcache_init(), which is skipped in this case. The tcache_slow settings embedded in TSD are initialized independently. Disabling an already initialized cache does not encounter this missing link, since tcache_init() has already run. Read and update the embedded settings through tsd_tcache_slowp_get(). This allows configuring the limit before the first enable without initializing the cache as a side effect. Add a fresh-thread regression covering the initial read, update while disabled, and preservation of the limit on first enable. A standalone public-API program also reproduces the original crash with tcache:false against a release library.
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 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: https://jemalloc.net/
Languages
C
88.4%
Perl
4.7%
M4
3.1%
Python
1.2%
Shell
1%
Other
1.6%