From 884fa22b8c8a23831eb4090fa92d191d6e3e394e Mon Sep 17 00:00:00 2001 From: Jason Evans Date: Sat, 3 Dec 2016 12:40:36 -0800 Subject: [PATCH] Rename arena_decay_t's ndirty to nunpurged. --- include/jemalloc/internal/arena.h | 2 +- src/arena.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/jemalloc/internal/arena.h b/include/jemalloc/internal/arena.h index afa8984d..6532b08a 100644 --- a/include/jemalloc/internal/arena.h +++ b/include/jemalloc/internal/arena.h @@ -106,7 +106,7 @@ struct arena_decay_s { * arena->ndirty to determine how many dirty pages, if any, were * generated. */ - size_t ndirty; + size_t nunpurged; /* * Trailing log of how many unused dirty pages were generated during * each of the past SMOOTHSTEP_NSTEPS decay epochs, where the last diff --git a/src/arena.c b/src/arena.c index c3587044..0eb6150b 100644 --- a/src/arena.c +++ b/src/arena.c @@ -431,8 +431,8 @@ arena_decay_backlog_npages_limit(const arena_t *arena) static void arena_decay_backlog_update_last(arena_t *arena) { - size_t ndirty_delta = (arena->ndirty > arena->decay.ndirty) ? - arena->ndirty - arena->decay.ndirty : 0; + size_t ndirty_delta = (arena->ndirty > arena->decay.nunpurged) ? + arena->ndirty - arena->decay.nunpurged : 0; arena->decay.backlog[SMOOTHSTEP_NSTEPS-1] = ndirty_delta; } @@ -491,7 +491,7 @@ arena_decay_epoch_advance_purge(tsdn_t *tsdn, arena_t *arena) if (arena->ndirty > ndirty_limit) arena_purge_to_limit(tsdn, arena, ndirty_limit); - arena->decay.ndirty = arena->ndirty; + arena->decay.nunpurged = arena->ndirty; } static void @@ -516,7 +516,7 @@ arena_decay_init(arena_t *arena, ssize_t decay_time) nstime_update(&arena->decay.epoch); arena->decay.jitter_state = (uint64_t)(uintptr_t)arena; arena_decay_deadline_init(arena); - arena->decay.ndirty = arena->ndirty; + arena->decay.nunpurged = arena->ndirty; memset(arena->decay.backlog, 0, SMOOTHSTEP_NSTEPS * sizeof(size_t)); }