mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-08-08 14:53:08 +03:00
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
1 changed files with 2 additions and 1 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue