guangli-dai 2f4db8cf5d Cap the base-block growth heuristic
base_block_alloc() grows new base blocks along the page size-class series to
reduce the number of disjoint VM ranges. This works well when new base blocks
are rare.

Under high thread churn, many threads can miss the base free pool in parallel
while allocating metadata.  base_extent_alloc() drops base->mtx after mapping a
new block, but before splitting and inserting the rest into the reuse pool.
Therefore, each parallel miss can map its own block and each completed
allocation then advances base->pind_last.  The result is that small metadata
requests can drive the growth heuristic to increasingly large mmap() sizes, far
beyond the actual allocation demand.

Cap the heuristic growth size at 128 MiB.  This preserves the usual amortization
benefit while bounding the rare pathological case where parallel misses rapidly
advance the growth series. Large individual requests are still honored because
min_block_size continues to override the cap.
2026-06-16 10:20:15 -07:00
2019-11-22 10:14:16 -08:00
2026-06-16 10:20:15 -07:00
2014-09-02 17:49:29 -07:00
2026-04-13 17:12:37 -07:00
2019-01-25 13:25:20 -08:00
2023-03-09 11:44:02 -08:00
2023-03-09 11:44:02 -08:00

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/
Description
No description provided
Readme 47 MiB
Languages
C 88.3%
Perl 5%
M4 3.2%
Python 1%
Shell 0.9%
Other 1.6%