Tech News
← Home  ·  All topics

Jemalloc

2 GoKawiil briefs on this topic

Jemalloc 5.4.0 released with pinned-memory tracking and tcache overhaul

The jemalloc project shipped version 5.4.0, a maintenance-focused update spanning more than 160 commits aimed at reducing technical debt through refactoring, bug fixes, expanded test coverage, and portability fixes. Key additions include an EXTENT_ALLOC_FLAG_PINNED flag letting custom allocation hooks mark non-reclaimable mappings like HugeTLB pages for preferential reuse, plus new mallctl interfaces to report pinned-memory and mutex statistics. The update also replaces the old fixed tcache refill/flush policy with a dynamic system that adapts to observed demand, removing seven legacy tuning controls in the process.

Benchmarks show musl libc lags glibc by up to 26% even with mimalloc swapped in

A developer investigating containerized Rust performance found that musl's default memory allocator is significantly slower than glibc's, not just under high concurrency but even on modest 4-core EC2 instances. Swapping in mimalloc or jemalloc narrows the gap but doesn't close it—one workload remained 26% slower—because several of musl's core memory routines are themselves inefficient, not just its allocator.