diff --git a/include/jemalloc/internal/cache_bin.h b/include/jemalloc/internal/cache_bin.h index cb137af9..3ca7e287 100644 --- a/include/jemalloc/internal/cache_bin.h +++ b/include/jemalloc/internal/cache_bin.h @@ -616,7 +616,7 @@ struct cache_bin_fill_ctl_s { * This is to avoid stack overflow when we do batch edata look up, which * reserves a nflush * sizeof(emap_batch_lookup_result_t) stack variable. */ -#define CACHE_BIN_NFLUSH_BATCH_MAX (VARIABLE_ARRAY_SIZE_MAX >> LG_SIZEOF_PTR) +#define CACHE_BIN_NFLUSH_BATCH_MAX ((VARIABLE_ARRAY_SIZE_MAX >> LG_SIZEOF_PTR) - 1) /* * Filling and flushing are done in batch, on arrays of void *s. For filling,