mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-07-23 21:23:06 +00:00
Add PAC: Page allocator classic.
For now, this is just a stub containing the ecaches, with no surrounding code changed. Eventually all the core allocator bits will be moved in, in the subsequent stack of commits.
This commit is contained in:
committed by
David Goldblatt
parent
1b5f632e0f
commit
777b0ba965
@@ -201,12 +201,12 @@ static uint64_t
|
||||
arena_decay_compute_purge_interval(tsdn_t *tsdn, arena_t *arena) {
|
||||
uint64_t i1, i2;
|
||||
i1 = arena_decay_compute_purge_interval_impl(tsdn,
|
||||
&arena->pa_shard.decay_dirty, &arena->pa_shard.ecache_dirty);
|
||||
&arena->pa_shard.decay_dirty, &arena->pa_shard.pac.ecache_dirty);
|
||||
if (i1 == BACKGROUND_THREAD_MIN_INTERVAL_NS) {
|
||||
return i1;
|
||||
}
|
||||
i2 = arena_decay_compute_purge_interval_impl(tsdn,
|
||||
&arena->pa_shard.decay_muzzy, &arena->pa_shard.ecache_muzzy);
|
||||
&arena->pa_shard.decay_muzzy, &arena->pa_shard.pac.ecache_muzzy);
|
||||
|
||||
return i1 < i2 ? i1 : i2;
|
||||
}
|
||||
@@ -716,8 +716,8 @@ background_thread_interval_check(tsdn_t *tsdn, arena_t *arena, decay_t *decay,
|
||||
if (info->npages_to_purge_new > BACKGROUND_THREAD_NPAGES_THRESHOLD) {
|
||||
should_signal = true;
|
||||
} else if (unlikely(background_thread_indefinite_sleep(info)) &&
|
||||
(ecache_npages_get(&arena->pa_shard.ecache_dirty) > 0 ||
|
||||
ecache_npages_get(&arena->pa_shard.ecache_muzzy) > 0 ||
|
||||
(ecache_npages_get(&arena->pa_shard.pac.ecache_dirty) > 0 ||
|
||||
ecache_npages_get(&arena->pa_shard.pac.ecache_muzzy) > 0 ||
|
||||
info->npages_to_purge_new > 0)) {
|
||||
should_signal = true;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user