Skip to the text
KDOS
Menu
kdos.dev KDOS from Scratch KDOS 0.2 · 4dd4a10 · 2026-11-30 Contents Index

87.29. jemalloc-5.4.0

A malloc that holds fragmentation down under many threads

5.4.0-1 · BSD-2-Clause · 0.8 SBU · 1022.5 KiB, 9 files · 41_system, 366 of 1047 · ports/core/devlibs/jemalloc

Homepage: https://jemalloc.net/

Depends on: perl.

Required by (1): satdump.

Sources: jemalloc-5.4.0.tar.bz2 (892.4 KiB). Every step kpkg takes applies to this port.

Install: script/chroot/exec.sh bash -c 'source script/phases/41_system/phase.env && kpkg install jemalloc'

build.sh:

case "$(uname -m)" in
	aarch64) _lgpage=16 ;;
	*) _lgpage=12 ;;
esac
export CFLAGS="${CFLAGS/-O2/-O3} -g0" CXXFLAGS="${CXXFLAGS/-O2/-O3} -g0"
./configure --prefix=/usr --libdir=/usr/lib --sysconfdir=/etc \
	--localstatedir=/var \
	--disable-static \
	--disable-doc \
	--enable-xmalloc \
	--with-lg-page=$_lgpage \
	--with-lg-hugepage=21
make
make DESTDIR=$PKG install
install -Dm644 doc/jemalloc.3 "$PKG/usr/share/man/man3/jemalloc.3"

test -f "$PKG/usr/lib/libjemalloc.so"

Programs: jemalloc-config, jemalloc.sh, jeprof.

Libraries: libjemalloc.so.

Directories: /usr/include/jemalloc, /usr/share/licenses/jemalloc.