lol

Merge pull request #38995 from yorickvP/rocksdb-jemalloc

rocksdb: use jemalloc 4.5.0

authored by

Yegor Timoshenko and committed by
GitHub
d17d4b70 74ed06ef

+47 -34
+35
pkgs/development/libraries/jemalloc/common.nix
··· 1 + { stdenv, fetchurl, version, sha256, ... }@args: 2 + 3 + stdenv.mkDerivation (rec { 4 + name = "jemalloc-${version}"; 5 + inherit version; 6 + 7 + src = fetchurl { 8 + url = "https://github.com/jemalloc/jemalloc/releases/download/${version}/${name}.tar.bz2"; 9 + inherit sha256; 10 + }; 11 + 12 + # By default, jemalloc puts a je_ prefix onto all its symbols on OSX, which 13 + # then stops downstream builds (mariadb in particular) from detecting it. This 14 + # option should remove the prefix and give us a working jemalloc. 15 + configureFlags = stdenv.lib.optional stdenv.isDarwin "--with-jemalloc-prefix=" 16 + # jemalloc is unable to correctly detect transparent hugepage support on 17 + # ARM (https://github.com/jemalloc/jemalloc/issues/526), and the default 18 + # kernel ARMv6/7 kernel does not enable it, so we explicitly disable support 19 + ++ stdenv.lib.optional stdenv.isArm "--disable-thp"; 20 + doCheck = true; 21 + 22 + enableParallelBuilding = true; 23 + 24 + meta = with stdenv.lib; { 25 + homepage = http://jemalloc.net; 26 + description = "General purpose malloc(3) implementation"; 27 + longDescription = '' 28 + malloc(3)-compatible memory allocator that emphasizes fragmentation 29 + avoidance and scalable concurrency support. 30 + ''; 31 + license = licenses.bsd2; 32 + platforms = platforms.all; 33 + maintainers = with maintainers; [ wkennington ]; 34 + }; 35 + } // (builtins.removeAttrs args [ "stdenv" "fetchurl" "version" "sha256" ]))
+3 -33
pkgs/development/libraries/jemalloc/default.nix
··· 1 1 { stdenv, fetchurl, fetchpatch }: 2 - 3 - stdenv.mkDerivation rec { 4 - name = "jemalloc-${version}"; 2 + import ./common.nix { 3 + inherit stdenv fetchurl; 5 4 version = "5.0.1"; 6 - 7 - src = fetchurl { 8 - url = "https://github.com/jemalloc/jemalloc/releases/download/${version}/${name}.tar.bz2"; 9 - sha256 = "4814781d395b0ef093b21a08e8e6e0bd3dab8762f9935bbfb71679b0dea7c3e9"; 10 - }; 11 - 12 - # By default, jemalloc puts a je_ prefix onto all its symbols on OSX, which 13 - # then stops downstream builds (mariadb in particular) from detecting it. This 14 - # option should remove the prefix and give us a working jemalloc. 15 - configureFlags = stdenv.lib.optional stdenv.isDarwin "--with-jemalloc-prefix=" 16 - # jemalloc is unable to correctly detect transparent hugepage support on 17 - # ARM (https://github.com/jemalloc/jemalloc/issues/526), and the default 18 - # kernel ARMv6/7 kernel does not enable it, so we explicitly disable support 19 - ++ stdenv.lib.optional stdenv.isArm "--disable-thp"; 20 - doCheck = true; 21 - 5 + sha256 = "4814781d395b0ef093b21a08e8e6e0bd3dab8762f9935bbfb71679b0dea7c3e9"; 22 6 patches = stdenv.lib.optional stdenv.isAarch64 (fetchpatch { 23 7 url = "https://patch-diff.githubusercontent.com/raw/jemalloc/jemalloc/pull/1035.patch"; 24 8 sha256 = "02y0q3dp253bipxv4r954nqipbjbj92p6ww9bx5bk3d8pa81wkqq"; 25 9 }); 26 - 27 - enableParallelBuilding = true; 28 - 29 - meta = with stdenv.lib; { 30 - homepage = http://jemalloc.net; 31 - description = "General purpose malloc(3) implementation"; 32 - longDescription = '' 33 - malloc(3)-compatible memory allocator that emphasizes fragmentation 34 - avoidance and scalable concurrency support. 35 - ''; 36 - license = licenses.bsd2; 37 - platforms = platforms.all; 38 - maintainers = with maintainers; [ wkennington ]; 39 - }; 40 10 }
+6
pkgs/development/libraries/jemalloc/jemalloc450.nix
··· 1 + { stdenv, fetchurl }: 2 + import ./common.nix { 3 + inherit stdenv fetchurl; 4 + version = "4.5.0"; 5 + sha256 = "10373xhpc10pgmai9fkc1z0rs029qlcb3c0qfnvkbwdlcibdh2cl"; 6 + }
+3 -1
pkgs/top-level/all-packages.nix
··· 9445 9445 9446 9446 jemalloc = callPackage ../development/libraries/jemalloc { }; 9447 9447 9448 + jemalloc450 = callPackage ../development/libraries/jemalloc/jemalloc450.nix { }; 9449 + 9448 9450 jshon = callPackage ../development/tools/parsing/jshon { }; 9449 9451 9450 9452 json2hcl = callPackage ../development/tools/json2hcl { }; ··· 11302 11304 11303 11305 rlog = callPackage ../development/libraries/rlog { }; 11304 11306 11305 - rocksdb = callPackage ../development/libraries/rocksdb { }; 11307 + rocksdb = callPackage ../development/libraries/rocksdb { jemalloc = jemalloc450; }; 11306 11308 11307 11309 rocksdb_lite = rocksdb.override { enableLite = true; }; 11308 11310