Refactor decay-related function parametrization.

Refactor most of the decay-related functions to take as parameters the
decay_t and associated extents_t structures to operate on.  This
prepares for supporting both lazy and forced purging on different decay
schedules.
This commit is contained in:
Jason Evans
2017-03-07 09:22:33 -08:00
parent ee202efc79
commit 765edd67b4
2 changed files with 103 additions and 93 deletions

View File

@@ -174,13 +174,6 @@ struct arena_s {
*/
size_t nactive;
/*
* Decay-based purging state.
*
* Synchronization: lock.
*/
arena_decay_t decay;
/*
* Extant large allocations.
*
@@ -199,6 +192,13 @@ struct arena_s {
extents_t extents_cached;
extents_t extents_retained;
/*
* Decay-based purging state.
*
* Synchronization: internal.
*/
arena_decay_t decay;
/*
* True if a thread is currently executing arena_purge_to_limit().
*