New features:
EXTENT_ALLOC_FLAG_PINNED so custom extent-allocation hooks can
mark non-reclaimable mappings, such as HugeTLB pages, for preferential
reuse outside the decay and purge pipeline. Add the mallctl interfaces
stats.pinned, stats.arenas.<i>.pinned,
stats.arenas.<i>.extents.<j>.npinned,stats.arenas.<i>.extents.<j>.pinned_bytes, andstats.arenas.<i>.mutexes.extents_pinned.{counter} to reportthread.arena.experimental_infallible_new option with the--enable-cxx-infallible-new option, enabling
compiler-level optimizations and optimization in move constructors,
and fix the new(std::nothrow) contract (@spredolac: 160ab9d, fe33667)
Incompatible changes:
seven legacy non-experimental controls: lg_tcache_nslots_mul,
tcache_nslots_small_min, tcache_nslots_small_max,tcache_nslots_large, tcache_gc_delay_bytes,lg_tcache_flush_small_div, and lg_tcache_flush_large_div.malloc_conf settings are silently ignored, matchingopt.* mallctls return ENOENT, and tcache_ncached_max remainsBug fixes:
errno across free, free_sized, and free_aligned_sized,process_madvise-based page purging. (@spredolac: 3a77966,free_sized() and free_aligned_sized() (C23O_CLOEXEC when opening the THP sysfs file in init_thp_state.opt.stats_print and opt.stats_print_opts fields inmalloc_stats_print output. (@spredolac: dfe3a2e)arena_reset. (@guangli-dai: 6957341)Optimizations and refactors:
jemalloc.c; untangle tcache/arena ownership; and consolidate the
helpers, and organizing ctl.c by subsystem. (@spredolac: 9e14346,
callers. (@guangli-dai: f1f0792)
pai_t/pai.h
abstraction, and moving deferred-work and decay orchestration out of thearena. (@guangli-dai: 1dfa6f7, 8edd101, d410f43)
operations out of allocator core code. (@guangli-dai: c4158ac,
Portability improvements:
std::__throw_bad_alloc call with standard C++ (#2900).arena_s use a flexible array member (bin_t all_bins[]) for C99--with-lg-vaddr. (@xinydev: e8a0d2b)malloc_getcpu on macOS to read the current CPU number correctly.CLOCK_MONOTONIC for background-thread sleep to prevent
clock-rollback stalls, and detect monotonic-condvar support at configuretime. (@antonio2368: ebacec3, 8361239)
-Wpedantic violations in macro
and function syntax and explicitly NUL-terminating profiling thread-name
copies to resolve -Wstringop-truncation. (@grueninger: 5acdcee,
strtok/atol,uint64_t. (@guangli-dai: 278d90a)