Remove ratio-based purging.

Make decay-based purging the default (and only) mode.

Remove associated mallctls:
- opt.purge
- opt.lg_dirty_mult
- arena.<i>.lg_dirty_mult
- arenas.lg_dirty_mult
- stats.arenas.<i>.lg_dirty_mult

This resolves #385.
This commit is contained in:
Jason Evans
2016-10-12 10:40:27 -07:00
parent b4b4a77848
commit 63b5657aa5
11 changed files with 38 additions and 485 deletions

View File

@@ -1,6 +1,6 @@
#include "test/jemalloc_test.h"
const char *malloc_conf = "purge:decay,decay_time:1,lg_tcache_max:0";
const char *malloc_conf = "decay_time:1,lg_tcache_max:0";
static nstime_monotonic_t *nstime_monotonic_orig;
static nstime_update_t *nstime_update_orig;
@@ -33,8 +33,6 @@ TEST_BEGIN(test_decay_ticks)
size_t sz, large0;
void *p;
test_skip_if(opt_purge != purge_mode_decay);
decay_ticker = decay_ticker_get(tsd_fetch(), 0);
assert_ptr_not_null(decay_ticker,
"Unexpected failure getting decay ticker");
@@ -213,8 +211,6 @@ TEST_BEGIN(test_decay_ticker)
unsigned i, nupdates0;
nstime_t time, decay_time, deadline;
test_skip_if(opt_purge != purge_mode_decay);
/*
* Allocate a bunch of large objects, pause the clock, deallocate the
* objects, restore the clock, then [md]allocx() in a tight loop to
@@ -307,8 +303,6 @@ TEST_BEGIN(test_decay_nonmonotonic)
size_t sz, large0;
unsigned i, nupdates0;
test_skip_if(opt_purge != purge_mode_decay);
sz = sizeof(size_t);
assert_d_eq(mallctl("arenas.lextent.0.size", &large0, &sz, NULL, 0), 0,
"Unexpected mallctl failure");