Bug 1258257 - Reduce mozjemalloc page cache size from 4 MiB to 1 MiB. r=glandium, a=lizzard
This reduces memory usage by up to 3 MiB per process.
MozReview-Commit-ID: Gfs9PIJM4br
--- a/memory/mozjemalloc/jemalloc.c
+++ b/memory/mozjemalloc/jemalloc.c
@@ -531,17 +531,17 @@ static const bool isthreaded = true;
#endif
/*
* Size and alignment of memory chunks that are allocated by the OS's virtual
* memory system.
*/
#define CHUNK_2POW_DEFAULT 20
/* Maximum number of dirty pages per arena. */
-#define DIRTY_MAX_DEFAULT (1U << 10)
+#define DIRTY_MAX_DEFAULT (1U << 8)
/*
* Maximum size of L1 cache line. This is used to avoid cache line aliasing,
* so over-estimates are okay (up to a point), but under-estimates will
* negatively affect performance.
*/
#define CACHELINE_2POW 6
#define CACHELINE ((size_t)(1U << CACHELINE_2POW))