Fix nfill = 0 bug when ncached_max is 1

This commit is contained in:
guangli-dai 2023-10-18 10:40:32 -07:00 committed by Qi Wang
parent 6fb3b6a8e4
commit d88fa71bbd
2 changed files with 4 additions and 0 deletions

View file

@ -1023,6 +1023,7 @@ arena_cache_bin_fill_small(tsdn_t *tsdn, arena_t *arena,
cache_bin_t *cache_bin, cache_bin_info_t *cache_bin_info, szind_t binind,
const unsigned nfill) {
assert(cache_bin_ncached_get_local(cache_bin, cache_bin_info) == 0);
assert(nfill != 0);
const bin_info_t *bin_info = &bin_infos[binind];