mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-08-24 08:03:32 +03:00
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:
parent
ee202efc79
commit
765edd67b4
2 changed files with 103 additions and 93 deletions
|
|
@ -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().
|
||||
*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue