Jemalloc 5.4.0 release includes over 160 commits focused on technical debt reduction, refactoring, bug fixes, and test improvements. New features include pinned memory tracking, per-CPU arena selection, and compile-time infallible allocation options, alongside removal of legacy tcache controls and various bug fixes and optimizations.
This article examines the evolution of malloc() memory allocation algorithms, detailing how they've progressed from basic stack-based approaches to modern multi-threaded solutions using arenas and thread-local buffers. It discusses performance bottlenecks in multithreaded programs, compares various allocator implementations, and provides recommendations for optimal malloc selection based on contention characteristics and memory locality.