jemalloc: default to 64KB page size on ppc64

Most ppc64 kernels default to 64KB pages, for example, Fedora, SUSE,
Arch POWER, and the upstream kernel itself (for Book3S, i.e. POWER4+)
all ship with `CONFIG_PPC_64K_PAGES=y`, however, NixOS forces 4KB
pages via `PPC_4K_PAGES`. A higher `--with-lg-page` is
forward-compatible with lower page sizes but may waste some memory, so
this commit trades a small amount of memory for broader build-host
compatibility.
This commit is contained in:
Amaan Qureshi
2026-03-10 02:13:45 -04:00
parent 1394617800
commit 16d93cfd9f
+5 -1
View File
@@ -55,7 +55,11 @@ stdenv.mkDerivation (finalAttrs: {
# https://sources.debian.org/src/jemalloc/5.3.0-3/debian/rules/
++ [
(
if (stdenv.hostPlatform.isAarch64 || stdenv.hostPlatform.isLoongArch64) then
if
(
stdenv.hostPlatform.isAarch64 || stdenv.hostPlatform.isLoongArch64 || stdenv.hostPlatform.isPower64
)
then
"--with-lg-page=16"
else
"--with-lg-page=12"