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:
@@ -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().
|
||||
*
|
||||
|
Reference in New Issue
Block a user