From e924a39abd4f2e4b66cd02e2686d64ac01ea96cc Mon Sep 17 00:00:00 2001 From: Pierre Bourdon Date: Mon, 22 Aug 2022 07:03:53 +0200 Subject: [PATCH] jemalloc: support page size up to 64KB on AArch64 The default build configuration only supports page sizes up to 4KB. AArch64 systems (among other architectures) can be configured with larger page sizes. nixpkgs's jemalloc currently crashes in these situations. --- pkgs/development/libraries/jemalloc/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/development/libraries/jemalloc/default.nix b/pkgs/development/libraries/jemalloc/default.nix index 6f9cb774c2a8..a2812a9c6677 100644 --- a/pkgs/development/libraries/jemalloc/default.nix +++ b/pkgs/development/libraries/jemalloc/default.nix @@ -30,6 +30,9 @@ stdenv.mkDerivation rec { "--disable-thp" "je_cv_thp=no" ] + # AArch64 has configurable page size up to 64k. The default configuration + # for jemalloc only supports 4k page sizes. + ++ lib.optional stdenv.isAarch64 "--with-lg-page=16" ; NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-Wno-error=array-bounds";