mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-07-22 04:03:11 +00:00
The maximum allowed value for `nflush_batch` is `CACHE_BIN_NFLUSH_BATCH_MAX`. However, `tcache_bin_flush_impl_small` could potentially declare an array of `emap_batch_lookup_result_t` of size `CACHE_BIN_NFLUSH_BATCH_MAX + 1`. leads to a `VARIABLE_ARRAY` assertion failure, observed when `tcache_nslots_small_max` is configured to 2048. This patch ensures the array size does not exceed the allowed maximum. Signed-off-by: Xin Yang <yangxin.dev@bytedance.com>