Skip to content

Commit

Permalink
Bug 811740 - Reduce the amount of unused dirty pages kept by jemalloc…
Browse files Browse the repository at this point in the history
… to 1MiB in B2G. r=jlebar, r=glandium
  • Loading branch information
gabrielesvelto committed Nov 28, 2012
1 parent ef4a0cd commit aa7fec0
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion memory/mozjemalloc/jemalloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,18 @@
*/
#define MOZ_MEMORY_NARENAS_DEFAULT_ONE

/*
* Pass this set of options to jemalloc as its default. It does not override
* the options passed via the MALLOC_OPTIONS environment variable but is
* applied in addition to them.
*/
#ifdef MOZ_B2G
/* Reduce the amount of unused dirty pages to 1MiB on B2G */
# define MOZ_MALLOC_OPTIONS "ff"
#else
# define MOZ_MALLOC_OPTIONS ""
#endif

/*
* MALLOC_STATS enables statistics calculation, and is required for
* jemalloc_stats().
Expand Down Expand Up @@ -1277,7 +1289,7 @@ static chunk_stats_t stats_chunks;
/*
* Runtime configuration options.
*/
const char *_malloc_options;
const char *_malloc_options = MOZ_MALLOC_OPTIONS;

#ifndef MALLOC_PRODUCTION
static bool opt_abort = true;
Expand Down

0 comments on commit aa7fec0

Please sign in to comment.