Bug 1258257 - Reduce mozjemalloc page cache size from 4 MiB to 1 MiB. r=glandium, a=lizzard
authorNicholas Nethercote <nnethercote@mozilla.com>
Thu, 24 Mar 2016 16:38:45 +1100
changeset 351481 a425d7a0ddb725d59ae9d506c9a0efaaecbdc236
parent 351480 2b4538637cab994985938254046bf69ee4772034
child 351482 a8ef0ccf056ce8956b89cb9d16939c075ae0f167
push id15502
push userahunt@mozilla.com
push dateThu, 14 Apr 2016 20:27:48 +0000
reviewersglandium, lizzard
bugs1258257
milestone47.0a2
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
memory/mozjemalloc/jemalloc.c
--- 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))