Fix arena_dalloc() performance regression.
Take into account large_pad when computing whether to pass the
deallocation request to tcache_dalloc_large(), so that the largest
cacheable size makes it back to tcache. This regression was introduced
by 8a03cf039c
(Implement cache index
randomization for large allocations.).
This commit is contained in:
parent
5154175cf1
commit
6591ff09d8
@ -1181,7 +1181,8 @@ arena_dalloc(tsd_t *tsd, void *ptr, tcache_t *tcache)
|
|||||||
assert(config_cache_oblivious || ((uintptr_t)ptr &
|
assert(config_cache_oblivious || ((uintptr_t)ptr &
|
||||||
PAGE_MASK) == 0);
|
PAGE_MASK) == 0);
|
||||||
|
|
||||||
if (likely(tcache != NULL) && size <= tcache_maxclass) {
|
if (likely(tcache != NULL) && size - large_pad <=
|
||||||
|
tcache_maxclass) {
|
||||||
tcache_dalloc_large(tsd, tcache, ptr, size -
|
tcache_dalloc_large(tsd, tcache, ptr, size -
|
||||||
large_pad);
|
large_pad);
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user