Refactor deferral constants into corresponding headers.

Currently there are deferral-relevant constants in arena.c and
background_thread.c. This commit moves them out into corresponding PAC
and HPA headers. Those commonly needed by both are put into a new header
deferral.h where the contract of deferral are clearly stated.
This commit is contained in:
guangli-dai 2026-06-28 15:00:03 -07:00 committed by Guangli Dai
parent 7f52ac7af3
commit e16ebfe27e
11 changed files with 65 additions and 31 deletions

View file

@ -595,7 +595,7 @@ arena_should_decay_early(tsdn_t *tsdn, arena_t *arena, decay_t *decay,
}
malloc_mutex_unlock(tsdn, &decay->mtx);
return info->npages_to_purge_new
> ARENA_DEFERRED_PURGE_NPAGES_THRESHOLD;
> PAC_DECAY_PURGE_NPAGES_THRESHOLD;
}
/*