aboutsummaryrefslogtreecommitdiff
path: root/pkgs/development/libraries/jemalloc
diff options
context:
space:
mode:
authorBen Wolsieffer <benwolsieffer@gmail.com>2019-09-08 22:53:23 -0400
committerBen Wolsieffer <benwolsieffer@gmail.com>2019-09-08 22:57:32 -0400
commitadf5ca2ce0b19d218ac210e2bb57fa07c2f064ba (patch)
tree92ab398053e05084fac7ff72042b5f0e41ecb8a3 /pkgs/development/libraries/jemalloc
parente19054ab3cd5b7cc9a01d0efc71c8fe310541065 (diff)
jemalloc450: disable transparent huge pages on ARM
Diffstat (limited to 'pkgs/development/libraries/jemalloc')
-rw-r--r--pkgs/development/libraries/jemalloc/common.nix7
1 files changed, 7 insertions, 0 deletions
diff --git a/pkgs/development/libraries/jemalloc/common.nix b/pkgs/development/libraries/jemalloc/common.nix
index c41455a65441..128910e00f21 100644
--- a/pkgs/development/libraries/jemalloc/common.nix
+++ b/pkgs/development/libraries/jemalloc/common.nix
@@ -24,6 +24,13 @@ stdenv.mkDerivation rec {
configureFlags = []
++ optional stripPrefix "--with-jemalloc-prefix="
++ optional disableInitExecTls "--disable-initial-exec-tls"
+ # jemalloc is unable to correctly detect transparent hugepage support on
+ # ARM (https://github.com/jemalloc/jemalloc/issues/526), and the default
+ # kernel ARMv6/7 kernel does not enable it, so we explicitly disable support
+ ++ optionals (stdenv.isAarch32 && versionOlder version "5") [
+ "--disable-thp"
+ "je_cv_thp=no"
+ ]
;
doCheck = true;