Add a per-arena oversize_threshold.

This can let manual arenas trade off memory and CPU the way auto arenas do.
This commit is contained in:
David Goldblatt
2020-11-11 13:34:43 -08:00
committed by David Goldblatt
parent 4ca3d91e96
commit cf2549a149
10 changed files with 194 additions and 12 deletions

View File

@@ -63,9 +63,11 @@ test_data_t *init_test_data(ssize_t dirty_decay_ms, ssize_t muzzy_decay_ms) {
nstime_t time;
nstime_init(&time, 0);
const size_t oversize_threshold = 8 * 1024 * 1024;
err = pa_shard_init(TSDN_NULL, &test_data->shard, &test_data->emap,
test_data->base, /* ind */ 1, &test_data->stats,
&test_data->stats_mtx, &time, dirty_decay_ms, muzzy_decay_ms);
&test_data->stats_mtx, &time, oversize_threshold, dirty_decay_ms,
muzzy_decay_ms);
assert_false(err, "");
return test_data;