From d303f30796f0aef7f7fc9d907ef240b93d3fc674 Mon Sep 17 00:00:00 2001 From: David Goldblatt Date: Wed, 26 Feb 2020 17:39:55 -0800 Subject: [PATCH] cache_bin nflush -> n. We're going to use it on the fill pathway as well. --- include/jemalloc/internal/cache_bin.h | 8 ++++---- src/tcache.c | 3 ++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/include/jemalloc/internal/cache_bin.h b/include/jemalloc/internal/cache_bin.h index 3f0524ea..1c679236 100644 --- a/include/jemalloc/internal/cache_bin.h +++ b/include/jemalloc/internal/cache_bin.h @@ -255,16 +255,16 @@ cache_bin_dalloc_easy(cache_bin_t *bin, void *ptr) { typedef struct cache_bin_ptr_array_s cache_bin_ptr_array_t; struct cache_bin_ptr_array_s { - cache_bin_sz_t nflush; + cache_bin_sz_t n; void **ptr; }; -#define CACHE_BIN_PTR_ARRAY_DECLARE(name, nflush_val) \ +#define CACHE_BIN_PTR_ARRAY_DECLARE(name, nval) \ cache_bin_ptr_array_t name; \ - name.nflush = (nflush_val) + name.n = (nval) static inline void -cache_bin_ptr_array_init(cache_bin_ptr_array_t *arr, cache_bin_t *bin, +cache_bin_ptr_array_init_for_flush(cache_bin_ptr_array_t *arr, cache_bin_t *bin, cache_bin_sz_t nflush, szind_t ind, cache_bin_info_t *infos) { arr->ptr = cache_bin_empty_position_get(bin, ind, infos) - 1; assert(cache_bin_ncached_get(bin, ind, infos) == 0 diff --git a/src/tcache.c b/src/tcache.c index d2442ef5..3fc4ee6a 100644 --- a/src/tcache.c +++ b/src/tcache.c @@ -182,7 +182,8 @@ tcache_bin_flush_impl(tsd_t *tsd, tcache_t *tcache, cache_bin_t *tbin, VARIABLE_ARRAY(edata_t *, item_edata, nflush + 1); CACHE_BIN_PTR_ARRAY_DECLARE(ptrs, nflush); - cache_bin_ptr_array_init(&ptrs, tbin, nflush, binind, tcache_bin_info); + cache_bin_ptr_array_init_for_flush(&ptrs, tbin, nflush, binind, + tcache_bin_info); /* Look up edata once per item. */ if (config_opt_safety_checks) {