mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-05-07 04:07:30 +03:00
Decay: move in some background_thread accesses.
This commit is contained in:
parent
cdb916ed3f
commit
d1d7e1076b
2 changed files with 15 additions and 4 deletions
|
|
@ -105,6 +105,17 @@ decay_epoch_npages_delta(const decay_t *decay) {
|
|||
return decay->backlog[SMOOTHSTEP_NSTEPS - 1];
|
||||
}
|
||||
|
||||
/*
|
||||
* Current epoch duration, in nanoseconds. Given that new epochs are started
|
||||
* somewhat haphazardly, this is not necessarily exactly the time between any
|
||||
* two calls to decay_maybe_advance_epoch; see the comments on fields in the
|
||||
* decay_t.
|
||||
*/
|
||||
static inline uint64_t
|
||||
decay_epoch_duration_ns(const decay_t *decay) {
|
||||
return nstime_ns(&decay->interval);
|
||||
}
|
||||
|
||||
/*
|
||||
* Returns true if the passed in decay time setting is valid.
|
||||
* < -1 : invalid
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue