mirror of
https://codeberg.org/redict/redict.git
synced 2025-01-22 08:08:53 -05:00
Fix defrag to support sharded bins in arena (added in v5.2.1)
See 37b8913925
This commit is contained in:
parent
91bc78a8b8
commit
908d3bdad9
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user