varnish: use jemalloc instead of glibc's malloc on linux.

this is the recommanded default, as glibc cause memory leaks:

"We ran into a problem with glibc's malloc on Linux where it seemed
like it failed to ever give memory back to the OS, causing the system
to swap. We have now switched to jemalloc which appears not to have
this problem." (from varnish-cache/doc/changes.rst)

authored by

Jean-Baptiste Giraudeau and committed by
Jonathan Ringer
785f04f9 0701f290

+4 -3
+4 -3
pkgs/servers/varnish/default.nix
··· 1 - { lib, stdenv, fetchurl, fetchpatch, pcre, pcre2, libxslt, groff, ncurses, pkg-config, readline, libedit, coreutils 2 - , python3, makeWrapper }: 3 4 let 5 common = { version, sha256, extraNativeBuildInputs ? [] }: ··· 19 libxslt groff ncurses readline libedit makeWrapper python3 20 ] 21 ++ lib.optional (lib.versionOlder version "7") pcre 22 - ++ lib.optional (lib.versionAtLeast version "7") pcre2; 23 24 buildFlags = [ "localstatedir=/var/spool" ]; 25
··· 1 + { lib, stdenv, fetchurl, fetchpatch, pcre, pcre2, jemalloc, libxslt, groff, ncurses, pkg-config, readline, libedit 2 + , coreutils, python3, makeWrapper }: 3 4 let 5 common = { version, sha256, extraNativeBuildInputs ? [] }: ··· 19 libxslt groff ncurses readline libedit makeWrapper python3 20 ] 21 ++ lib.optional (lib.versionOlder version "7") pcre 22 + ++ lib.optional (lib.versionAtLeast version "7") pcre2 23 + ++ lib.optional stdenv.hostPlatform.isLinux jemalloc; 24 25 buildFlags = [ "localstatedir=/var/spool" ]; 26