Bug 1219914 - increase jemalloc's 'lg_dirty_mult' parameter from the default of 3 to 6
This has the impact of reducing the page size cache from ~20MB of memory to 1-2MB. This is important because we now pay that penalty in memory usage for each process, and we'd rather not. The performance impact of this change is believed to be minimal, as a similar change we implemented in mozjemalloc without significant impact.
MozReview-Commit-ID: FOxxuDnwz2c
--- a/build/mozconfig.common
+++ b/build/mozconfig.common
@@ -18,10 +18,12 @@ ac_add_options --enable-release
# Enable checking that add-ons are signed by the trusted root
MOZ_ADDON_SIGNING=${MOZ_ADDON_SIGNING-1}
# Disable enforcing that add-ons are signed by the trusted root
MOZ_REQUIRE_SIGNING=${MOZ_REQUIRE_SIGNING-0}
ac_add_options --enable-js-shell
+ac_add_options --enable-jemalloc=4
+
. "$topsrcdir/build/mozconfig.automation"
. "$topsrcdir/build/mozconfig.rust"
--- a/memory/build/jemalloc_config.cpp
+++ b/memory/build/jemalloc_config.cpp
@@ -27,17 +27,17 @@
/* Override some jemalloc defaults */
#ifdef DEBUG
#define MOZ_MALLOC_BUILD_OPTIONS ",junk:true"
#else
#define MOZ_MALLOC_BUILD_OPTIONS ",junk:free"
#endif
-#define MOZ_MALLOC_OPTIONS "narenas:1,tcache:false"
+#define MOZ_MALLOC_OPTIONS "lg_dirty_mult:6,narenas:1,tcache:false"
MFBT_DATA const char* je_(malloc_conf) =
MOZ_MALLOC_OPTIONS MOZ_MALLOC_BUILD_OPTIONS;
#ifdef ANDROID
#include <android/log.h>
static void
_je_malloc_message(void* cbopaque, const char* s)