diff options
author | Jason Evans <je@fb.com> | 2011-03-18 17:53:15 (GMT) |
---|---|---|
committer | Jason Evans <je@fb.com> | 2011-03-18 17:53:15 (GMT) |
commit | 9c43c13a35220c10d97a886616899189daceb359 (patch) | |
tree | 662c25f1d9e5f8055c85e918ad928aae240dbc09 /jemalloc | |
parent | 84c8eefeffa246607790ad12e28b0f6a24ecc59d (diff) | |
download | jemalloc-9c43c13a35220c10d97a886616899189daceb359.zip jemalloc-9c43c13a35220c10d97a886616899189daceb359.tar.gz jemalloc-9c43c13a35220c10d97a886616899189daceb359.tar.bz2 |
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.
Diffstat (limited to 'jemalloc')
-rw-r--r-- | jemalloc/src/arena.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/jemalloc/src/arena.c b/jemalloc/src/arena.c index 87bd9bb..a1fa2a3 100644 --- a/jemalloc/src/arena.c +++ b/jemalloc/src/arena.c @@ -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) * |