Jemalloc
lastmod 2020-07-15created 2015-09-1110 edits
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.
How to use
Heap Profiling
Leak Checking
MALLOC_CONF=prof_leak:true,lg_prof_sample:0,prof_final:true \
LD_PRELOAD=${JEMALLOC_PATH}/lib/libjemalloc.so.2 w
See also
- std::allocator
- mtrace (glibc debugging)
- Thread-Caching Malloc (TCMalloc)
- nedmalloc
- ptmalloc
- heaptrack
- mimalloc
Favorite site
- jemalloc web site
- Github - jemalloc project site
- jemalloc, Facebook's memory allocator
- [Recommended] Scalable memory allocation using jemalloc
- Multithread-optimized heap memory allocators - tcmalloc. jemalloc
- [Recommended] Memory Allocators in multithreaded environments 1
- [Recommended] Testing Memory Allocators: ptmalloc2 vs tcmalloc vs hoard vs jemalloc While Trying to Simulate Real-World Loads 2
- Benchmarking Ruby's Heap: malloc, tcmalloc, jemalloc
- For MySQL DBAs :: 18. How JEMalloc works
- The last free lunch. jemalloc, Facebook's memory allocator