Move arena decay getters to PA.
This commit is contained in:
committed by
David Goldblatt
parent
48a2cd6d79
commit
e77f47a85a
@@ -108,12 +108,6 @@ arena_prof_info_set(tsd_t *tsd, edata_t *edata, prof_tctx_t *tctx) {
|
||||
large_prof_info_set(edata, tctx);
|
||||
}
|
||||
|
||||
JEMALLOC_ALWAYS_INLINE bool
|
||||
arena_may_force_decay(arena_t *arena) {
|
||||
return !(arena_dirty_decay_ms_get(arena) == -1
|
||||
|| arena_muzzy_decay_ms_get(arena) == -1);
|
||||
}
|
||||
|
||||
JEMALLOC_ALWAYS_INLINE void
|
||||
arena_decay_ticks(tsdn_t *tsdn, arena_t *arena, unsigned nticks) {
|
||||
tsd_t *tsd;
|
||||
|
@@ -90,6 +90,21 @@ pa_shard_stats_mapped_add(tsdn_t *tsdn, pa_shard_t *shard, size_t size) {
|
||||
LOCKEDINT_MTX_UNLOCK(tsdn, *shard->stats_mtx);
|
||||
}
|
||||
|
||||
static inline ssize_t
|
||||
pa_shard_dirty_decay_ms_get(pa_shard_t *shard) {
|
||||
return decay_ms_read(&shard->decay_dirty);
|
||||
}
|
||||
static inline ssize_t
|
||||
pa_shard_muzzy_decay_ms_get(pa_shard_t *shard) {
|
||||
return decay_ms_read(&shard->decay_muzzy);
|
||||
}
|
||||
|
||||
static inline bool
|
||||
pa_shard_may_force_decay(pa_shard_t *shard) {
|
||||
return !(pa_shard_dirty_decay_ms_get(shard) == -1
|
||||
|| pa_shard_muzzy_decay_ms_get(shard) == -1);
|
||||
}
|
||||
|
||||
/* Returns true on error. */
|
||||
bool pa_shard_init(tsdn_t *tsdn, pa_shard_t *shard, base_t *base, unsigned ind,
|
||||
pa_shard_stats_t *stats, malloc_mutex_t *stats_mtx);
|
||||
|
Reference in New Issue
Block a user