pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/devel/jemalloc
Module Name: pkgsrc
Committed By: adam
Date: Wed Sep 23 13:26:01 UTC 2026
Modified Files:
pkgsrc/devel/jemalloc: Makefile distinfo
pkgsrc/devel/jemalloc/patches: patch-configure
Removed Files:
pkgsrc/devel/jemalloc/patches:
patch-include_jemalloc_internal_quantum.h
Log Message:
jemalloc: updated to 5.4.0
5.4.0 (Sep 17, 2026)
This release contains over 160 commits, focusing on the technical debts
cleaning including refactorings, bug fixes, test coverage improvement, and
option cleanups. The release also includes portability improvements per
upstream issues report.
New features:
- Add `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`, and
`stats.arenas.<i>.mutexes.extents_pinned.{counter}` to report
pinned-memory usage and mutex statistics. (@binliu19: be2de8cc)
- Allow resuming per-CPU arena selection via `thread.arena`.
(@algunenano: 68c35f65)
- Better align the contents of human-readable and JSON malloc statistics.
(@spredolac: 68fe1be1, 30b1a410, 04aad97f)
- Replace the runtime `experimental_infallible_new` option with the
compile-time `--enable-cxx-infallible-new` option, enabling
compiler-level optimizations and optimization in move constructors,
and fix the `new(std::nothrow)` contract (@spredolac: 160ab9d7, fe336672)
Incompatible changes:
- Adapt tcache fill and retention targets per bin to demand observed
between GC events, replacing the fixed refill/flush policy. Remove
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`.
Corresponding `malloc_conf` settings are silently ignored, matching
`opt.*` mallctls return ENOENT, and `tcache_ncached_max` remains
supported. (@spredolac: d13fe91a)
Bug fixes:
- Preserve `errno` across `free`, `free_sized`, and `free_aligned_sized`,
and across `process_madvise`-based page purging. (@spredolac: 3a779661,
86f05828)
- Fix numeric overflow checks in size classes. (@spredolac: 6b245225)
- Accept NULL in `free_sized()` and `free_aligned_sized()` (C23
correctness). (@bigbruno: 7ce8b916)
- Fix TSD lifecycle edge cases by 1) initializing thread-cache bins before
marking the cache enabled, preventing reentrant bootstrap allocations
from using uninitialized state, and 2) avoiding TSD recreation for late
deallocations after thread teardown on generic-TSD platforms.
(@fzakaria: 54f22c83, @spredolac: fb5499aa)
- Use `O_CLOEXEC` when opening the THP sysfs file in `init_thp_state`.
(@ibookstein: d0705543)
- Fix duplicate `opt.stats_print` and `opt.stats_print_opts` fields in
`malloc_stats_print` output. (@spredolac: dfe3a2ed)
- Fix a potential deadlock during `arena_reset`. (@guangli-dai: 6957341f)
- Fix a prof-sampling / guard-page interaction bug in the SAN. (@gctony:
e36a0fa5)
Optimizations and refactors:
- Modularize jemalloc's front end by extracting arena management,
initialization, fork orchestration, and allocation dispatch from
`jemalloc.c`; untangle tcache/arena ownership; and consolidate the
internal header graph to eliminate circular dependencies. (@spredolac:
ba1e2fe4, 88745978, 9d757223, de9ad145, ...)
- Simplify ctl dispatch by refactoring arena helpers, internalizing an
implementation-only control, replacing control-flow macros with typed
helpers, and organizing `ctl.c` by subsystem. (@spredolac: 9e143468,
901365d4, 4e903a0a, 5bc8d6e9)
- Cap the base-block growth heuristic to avoid virtual-memory exhaustion
under rare racy conditions. (@guangli-dai: 2f4db8cf)
- Move background-thread lifecycle and state operations into the
background-thread module, clarifying ownership independently of PAC/HPA
callers. (@guangli-dai: f1f07923)
- Simplify the page-allocation boundary by replacing PAI vtable dispatch
with direct PAC/HPA calls, removing the obsolete `pai_t`/`pai.h`
abstraction, and moving deferred-work and decay orchestration out of the
arena. (@guangli-dai: 1dfa6f7a, 8edd1012, d410f43e)
- Refactor statistics collection and rendering into separate
gather/emission stages and descriptor-driven tables. (@spredolac:
184f304d, 80c8fcb4)
- Introduce an OS abstraction layer and move platform-dependent
file/process I/O, time, synchronization, CPU, virtual-memory, atfork,
error-handling, profiling, thread-yield, and configuration-access
operations out of allocator core code. (@guangli-dai: c4158aca,
c8e2e013, ...)
Portability improvements:
- Replace the `std::__throw_bad_alloc` call with standard C++
(@lexprfuncall: 1a15fe33)
- Make `arena_s` use a flexible array member (`bin_t all_bins[]`) for C99
or newer. (@grueninger: 300b58b4)
- Fix rdtscp detection with `--with-lg-vaddr`. (@xinydev: e8a0d2b4)
- Fix `malloc_getcpu` on macOS to read the current CPU number correctly.
(@algunenano: 5aabbc87)
- Use `CLOCK_MONOTONIC` for background-thread sleep to prevent
clock-rollback stalls, and detect monotonic-condvar support at configure
time. (@antonio2368: ebacec3a, 8361239b)
- Fix compilation warnings on macOS. (@gctony: abb0a8a0)
- Fix thread-exit TSD cleanup on MinGW builds. (@gctony: 1e923170)
- Fix GCC 16 build warnings by removing `-Wpedantic` violations in macro
and function syntax and explicitly NUL-terminating profiling thread-name
copies to resolve `-Wstringop-truncation`. (@grueninger: 5acdcee6,
c22d929a, @jasonangelov: 6a245e02)
- Parse PID-namespace symlinks without glibc-dependent `strtok`/`atol`,
and return identifiers as `uint64_t`. (@guangli-dai: 278d90a5)
To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 pkgsrc/devel/jemalloc/Makefile
cvs rdiff -u -r1.20 -r1.21 pkgsrc/devel/jemalloc/distinfo
cvs rdiff -u -r1.3 -r1.4 pkgsrc/devel/jemalloc/patches/patch-configure
cvs rdiff -u -r1.2 -r0 \
pkgsrc/devel/jemalloc/patches/patch-include_jemalloc_internal_quantum.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/devel/jemalloc/Makefile
diff -u pkgsrc/devel/jemalloc/Makefile:1.27 pkgsrc/devel/jemalloc/Makefile:1.28
--- pkgsrc/devel/jemalloc/Makefile:1.27 Tue Apr 14 12:49:12 2026
+++ pkgsrc/devel/jemalloc/Makefile Wed Sep 23 13:26:01 2026
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.27 2026/04/14 12:49:12 adam Exp $
+# $NetBSD: Makefile,v 1.28 2026/09/23 13:26:01 adam Exp $
-DISTNAME= jemalloc-5.3.1
+DISTNAME= jemalloc-5.4.0
CATEGORIES= devel
MASTER_SITES= ${MASTER_SITE_GITHUB:=jemalloc/}
GITHUB_RELEASE= ${PKGVERSION_NOREV}
Index: pkgsrc/devel/jemalloc/distinfo
diff -u pkgsrc/devel/jemalloc/distinfo:1.20 pkgsrc/devel/jemalloc/distinfo:1.21
--- pkgsrc/devel/jemalloc/distinfo:1.20 Tue Apr 14 12:49:12 2026
+++ pkgsrc/devel/jemalloc/distinfo Wed Sep 23 13:26:01 2026
@@ -1,7 +1,6 @@
-$NetBSD: distinfo,v 1.20 2026/04/14 12:49:12 adam Exp $
+$NetBSD: distinfo,v 1.21 2026/09/23 13:26:01 adam Exp $
-BLAKE2s (jemalloc-5.3.1.tar.bz2) = a87c3c4ccc03226c7d8f2a01a5f1917b18e223feae9a72154bf85a8134a12c5c
-SHA512 (jemalloc-5.3.1.tar.bz2) = 46e4829c88078618860cb75aff074f281306eeb9fa624b7457dd9464d811723f80c27af1c3648e04c9fa74df5c087ae4e415c3b611602fd849f83f37f8cd4f9d
-Size (jemalloc-5.3.1.tar.bz2) = 920181 bytes
-SHA1 (patch-configure) = 5dec3fb5b2ece549e40743780db3057dd83cc17e
-SHA1 (patch-include_jemalloc_internal_quantum.h) = 78be39875a93294989f6f22c61fa0950a28e8c4a
+BLAKE2s (jemalloc-5.4.0.tar.bz2) = 01d1fb03e56055b7844502a817e6ac8db949d6833b838dd08c79d133ae21cc23
+SHA512 (jemalloc-5.4.0.tar.bz2) = a6771bdc3f066fc458d4723cee3018b445b966a96013074b6aa5ee685e9991ca8a20473ee069c9f4b5912b1ed74a705b059f5c19b4e57c3035d428f055b4d7fd
+Size (jemalloc-5.4.0.tar.bz2) = 913812 bytes
+SHA1 (patch-configure) = 5ca75951d956705b094db4b760145f638a5e04c9
Index: pkgsrc/devel/jemalloc/patches/patch-configure
diff -u pkgsrc/devel/jemalloc/patches/patch-configure:1.3 pkgsrc/devel/jemalloc/patches/patch-configure:1.4
--- pkgsrc/devel/jemalloc/patches/patch-configure:1.3 Tue May 15 08:35:50 2018
+++ pkgsrc/devel/jemalloc/patches/patch-configure Wed Sep 23 13:26:01 2026
@@ -1,48 +1,48 @@
-$NetBSD: patch-configure,v 1.3 2018/05/15 08:35:50 adam Exp $
+$NetBSD: patch-configure,v 1.4 2026/09/23 13:26:01 adam Exp $
Do not use -O3, -g3, nor -funroll-loops; prefer PkgSrc provided compiler flags.
---- configure.orig 2018-05-08 19:16:45.000000000 +0000
+--- configure.orig 2026-09-17 06:16:37.000000000 +0000
+++ configure
-@@ -4024,7 +4024,7 @@ fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler supports -g3" >&5
- $as_echo_n "checking whether compiler supports -g3... " >&6; }
+@@ -5316,7 +5316,7 @@ fi
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether compiler supports -g3" >&5
+ printf %s "checking whether compiler supports -g3... " >&6; }
T_CONFIGURE_CFLAGS="${CONFIGURE_CFLAGS}"
-T_APPEND_V=-g3
+T_APPEND_V=
if test "x${CONFIGURE_CFLAGS}" = "x" -o "x${T_APPEND_V}" = "x" ; then
CONFIGURE_CFLAGS="${CONFIGURE_CFLAGS}${T_APPEND_V}"
else
-@@ -5936,7 +5936,7 @@ fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler supports -g3" >&5
- $as_echo_n "checking whether compiler supports -g3... " >&6; }
+@@ -8009,7 +8009,7 @@ fi
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether compiler supports -g3" >&5
+ printf %s "checking whether compiler supports -g3... " >&6; }
T_CONFIGURE_CXXFLAGS="${CONFIGURE_CXXFLAGS}"
-T_APPEND_V=-g3
+T_APPEND_V=
if test "x${CONFIGURE_CXXFLAGS}" = "x" -o "x${T_APPEND_V}" = "x" ; then
CONFIGURE_CXXFLAGS="${CONFIGURE_CXXFLAGS}${T_APPEND_V}"
else
-@@ -8961,7 +8961,7 @@ if test "x$enable_debug" = "x0" ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler supports -O3" >&5
- $as_echo_n "checking whether compiler supports -O3... " >&6; }
+@@ -12260,7 +12260,7 @@ if test "x$enable_debug" = "x0" ; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether compiler supports -O3" >&5
+ printf %s "checking whether compiler supports -O3... " >&6; }
T_CONFIGURE_CFLAGS="${CONFIGURE_CFLAGS}"
-T_APPEND_V=-O3
+T_APPEND_V=
if test "x${CONFIGURE_CFLAGS}" = "x" -o "x${T_APPEND_V}" = "x" ; then
CONFIGURE_CFLAGS="${CONFIGURE_CFLAGS}${T_APPEND_V}"
else
-@@ -9012,7 +9012,7 @@ fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler supports -O3" >&5
- $as_echo_n "checking whether compiler supports -O3... " >&6; }
+@@ -12312,7 +12312,7 @@ fi
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether compiler supports -O3" >&5
+ printf %s "checking whether compiler supports -O3... " >&6; }
T_CONFIGURE_CXXFLAGS="${CONFIGURE_CXXFLAGS}"
-T_APPEND_V=-O3
+T_APPEND_V=
if test "x${CONFIGURE_CXXFLAGS}" = "x" -o "x${T_APPEND_V}" = "x" ; then
CONFIGURE_CXXFLAGS="${CONFIGURE_CXXFLAGS}${T_APPEND_V}"
else
-@@ -9075,7 +9075,7 @@ fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler supports -funroll-loops" >&5
- $as_echo_n "checking whether compiler supports -funroll-loops... " >&6; }
+@@ -12376,7 +12376,7 @@ fi
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether compiler supports -funroll-loops" >&5
+ printf %s "checking whether compiler supports -funroll-loops... " >&6; }
T_CONFIGURE_CFLAGS="${CONFIGURE_CFLAGS}"
-T_APPEND_V=-funroll-loops
+T_APPEND_V=
Home |
Main Index |
Thread Index |
Old Index