Reverse tcache fill order.
Refill the thread cache such that low regions get used first. This fixes a regression due to the recent transition to bitmap-based region management.
This commit is contained in:
parent
84c8eefeff
commit
9c43c13a35
@ -1360,7 +1360,8 @@ arena_tcache_fill_small(arena_t *arena, tcache_bin_t *tbin, size_t binind
|
||||
ptr = arena_bin_malloc_hard(arena, bin);
|
||||
if (ptr == NULL)
|
||||
break;
|
||||
tbin->avail[i] = ptr;
|
||||
/* Insert such that low regions get used first. */
|
||||
tbin->avail[nfill - 1 - i] = ptr;
|
||||
}
|
||||
#ifdef JEMALLOC_STATS
|
||||
bin->stats.allocated += (i - tbin->ncached) *
|
||||
|
Loading…
Reference in New Issue
Block a user