diff options
author | Christopher Ferris <cferris@google.com> | 2017-05-15 16:48:07 -0700 |
---|---|---|
committer | Christopher Ferris <cferris@google.com> | 2017-05-23 13:43:53 -0700 |
commit | 7d7fbe660d1fe68fa412449d6033177319c7da3e (patch) | |
tree | 40e206842590a3f28d39e164f733d09ac6c3656a | |
parent | b43ab5d1ba0c131ac0fbf5136c2bfd2bcd5df959 (diff) | |
download | jemalloc-7d7fbe660d1fe68fa412449d6033177319c7da3e.tar.gz |
Change the decay timer default to 0.android-vts-8.0_r2android-vts-8.0_r1oreo-dev
Default to always purging, and then assume that people can change
this value if they are willing to leave a bit of PSS hanging around.
Bug: 36401135
Test: Built and booted bullhead.
Test: Ran jemalloc unit tests.
Test: Ran bionic unit tests.
Test: Ran a test that allocated and free'd a large piece of memory,
Test: and verified that after changing the parameter, the PSS
Test: sticks around (decay timer set to 1), the PSS is purged (decay
Test: timer set to 0).
(cherry picked from commit a6f685beacaa3f8da06cb28f38bb559eac7d4dda)
Change-Id: Ide1381d78e070f155ee820bfcbeebe0d8b6a3693
-rw-r--r-- | include/jemalloc/internal/arena.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/include/jemalloc/internal/arena.h b/include/jemalloc/internal/arena.h index 1ab91ea..df6e0b2 100644 --- a/include/jemalloc/internal/arena.h +++ b/include/jemalloc/internal/arena.h @@ -30,13 +30,16 @@ typedef enum { purge_mode_limit = 2 } purge_mode_t; /* ANDROID change */ -/* Use the decay mode purge method. Do not set this value to zero, since - * forcing a purge immediately affects performance negatively. Using a - * small value provides a compromise between performance and extra PSS. +/* Use the decay mode purge method. + * Setting this value to zero results in performance issues because it + * causes purges at every free. Leave the default at zero, but zygote + * processes will set this to one using mallopt. This allows apps which + * tend to be active to benefit from the extra performance, but allow system + * servers to free PSS while they are sitting idle. */ #define PURGE_DEFAULT purge_mode_decay /* Default decay time in seconds. */ -#define DECAY_TIME_DEFAULT 1 +#define DECAY_TIME_DEFAULT 0 /* End ANDROID change */ /* Number of event ticks between time checks. */ #define DECAY_NTICKS_PER_UPDATE 1000 |