mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-08-25 16:43:33 +03:00
PA: Minor cleanups and comment fixes.
This commit is contained in:
parent
46a9d7fc0b
commit
c075fd0bcb
3 changed files with 38 additions and 15 deletions
10
src/pa.c
10
src/pa.c
|
|
@ -260,13 +260,12 @@ pa_decay_stashed(tsdn_t *tsdn, pa_shard_t *shard, decay_t *decay,
|
|||
* stashed), otherwise unbounded new pages could be added to extents during the
|
||||
* current decay run, so that the purging thread never finishes.
|
||||
*/
|
||||
void
|
||||
static void
|
||||
pa_decay_to_limit(tsdn_t *tsdn, pa_shard_t *shard, decay_t *decay,
|
||||
pa_shard_decay_stats_t *decay_stats, ecache_t *ecache, bool fully_decay,
|
||||
size_t npages_limit, size_t npages_decay_max) {
|
||||
witness_assert_depth_to_rank(tsdn_witness_tsdp_get(tsdn),
|
||||
WITNESS_RANK_CORE, 1);
|
||||
malloc_mutex_assert_owner(tsdn, &decay->mtx);
|
||||
|
||||
if (decay->purging || npages_decay_max == 0) {
|
||||
return;
|
||||
|
|
@ -291,10 +290,9 @@ pa_decay_to_limit(tsdn_t *tsdn, pa_shard_t *shard, decay_t *decay,
|
|||
void
|
||||
pa_decay_all(tsdn_t *tsdn, pa_shard_t *shard, decay_t *decay,
|
||||
pa_shard_decay_stats_t *decay_stats, ecache_t *ecache, bool fully_decay) {
|
||||
malloc_mutex_lock(tsdn, &decay->mtx);
|
||||
pa_decay_to_limit(tsdn, shard, decay, decay_stats, ecache,
|
||||
fully_decay, 0, ecache_npages_get(ecache));
|
||||
malloc_mutex_unlock(tsdn, &decay->mtx);
|
||||
malloc_mutex_assert_owner(tsdn, &decay->mtx);
|
||||
pa_decay_to_limit(tsdn, shard, decay, decay_stats, ecache, fully_decay,
|
||||
/* npages_limit */ 0, ecache_npages_get(ecache));
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue