summaryrefslogtreecommitdiff
path: root/deps
diff options
context:
space:
mode:
authorYoav Steinberg <yoav@monfort.co.il>2021-10-10 12:44:55 +0300
committerYoav Steinberg <yoav@monfort.co.il>2021-10-10 18:29:13 +0300
commit908d3bdad96ca44f2019d074f5d548058ab5d27c (patch)
tree2d303ea12510bf3b5d3c4ddc620a5c6c46990de1 /deps
parent91bc78a8b8e3dee4bb531cc37f4fbd87db928cc5 (diff)
downloadredis-908d3bdad96ca44f2019d074f5d548058ab5d27c.tar.gz
Fix defrag to support sharded bins in arena (added in v5.2.1)
See https://github.com/jemalloc/jemalloc/commit/37b89139252db18c95ebce3e0eac67817fa4a8ab
Diffstat (limited to 'deps')
-rw-r--r--deps/jemalloc/include/jemalloc/internal/jemalloc_internal_inlines_c.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/deps/jemalloc/include/jemalloc/internal/jemalloc_internal_inlines_c.h b/deps/jemalloc/include/jemalloc/internal/jemalloc_internal_inlines_c.h
index 17b2472ff..93eba1e57 100644
--- a/deps/jemalloc/include/jemalloc/internal/jemalloc_internal_inlines_c.h
+++ b/deps/jemalloc/include/jemalloc/internal/jemalloc_internal_inlines_c.h
@@ -232,7 +232,8 @@ iget_defrag_hint(tsdn_t *tsdn, void* ptr, int *bin_util, int *run_util) {
extent_t *slab = iealloc(tsdn, ptr);
arena_t *arena = extent_arena_get(slab);
szind_t binind = extent_szind_get(slab);
- bin_t *bin = &arena->bins[binind];
+ unsigned binshard = extent_binshard_get(slab);
+ bin_t *bin = &arena->bins[binind].bin_shards[binshard];
malloc_mutex_lock(tsdn, &bin->lock);
/* don't bother moving allocations from the slab currently used for new allocations */
if (slab != bin->slabcur) {