mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-05-01 01:28:00 +03:00
Implement two-phase decay-based purging.
Split decay-based purging into two phases, the first of which uses lazy
purging to convert dirty pages to "muzzy", and the second of which uses
forced purging, decommit, or unmapping to convert pages to clean or
destroy them altogether. Not all operating systems support lazy
purging, yet the application may provide extent hooks that implement
lazy purging, so care must be taken to dynamically omit the first phase
when necessary.
The mallctl interfaces change as follows:
- opt.decay_time --> opt.{dirty,muzzy}_decay_time
- arena.<i>.decay_time --> arena.<i>.{dirty,muzzy}_decay_time
- arenas.decay_time --> arenas.{dirty,muzzy}_decay_time
- stats.arenas.<i>.pdirty --> stats.arenas.<i>.p{dirty,muzzy}
- stats.arenas.<i>.{npurge,nmadvise,purged} -->
stats.arenas.<i>.{dirty,muzzy}_{npurge,nmadvise,purged}
This resolves #521.
This commit is contained in:
parent
38a5bfc816
commit
64e458f5cd
23 changed files with 1078 additions and 490 deletions
|
|
@ -1064,8 +1064,10 @@ malloc_conf_init(void) {
|
|||
}
|
||||
CONF_HANDLE_UNSIGNED(opt_narenas, "narenas", 1,
|
||||
UINT_MAX, yes, no, false)
|
||||
CONF_HANDLE_SSIZE_T(opt_decay_time, "decay_time", -1,
|
||||
NSTIME_SEC_MAX);
|
||||
CONF_HANDLE_SSIZE_T(opt_dirty_decay_time,
|
||||
"dirty_decay_time", -1, NSTIME_SEC_MAX);
|
||||
CONF_HANDLE_SSIZE_T(opt_muzzy_decay_time,
|
||||
"muzzy_decay_time", -1, NSTIME_SEC_MAX);
|
||||
CONF_HANDLE_BOOL(opt_stats_print, "stats_print", true)
|
||||
if (config_fill) {
|
||||
if (CONF_MATCH("junk")) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue