mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-06-17 17:35:39 +03:00
Tcache: treat small and large cache bins uniformly
This commit is contained in:
parent
a13fbad374
commit
cd29ebefd0
8 changed files with 87 additions and 145 deletions
|
|
@ -2495,7 +2495,7 @@ je_malloc(size_t size) {
|
|||
assert(tsd_fast(tsd));
|
||||
|
||||
tcache_t *tcache = tsd_tcachep_get(tsd);
|
||||
cache_bin_t *bin = tcache_small_bin_get(tcache, ind);
|
||||
cache_bin_t *bin = &tcache->bins[ind];
|
||||
bool tcache_success;
|
||||
void *ret;
|
||||
|
||||
|
|
@ -2828,7 +2828,7 @@ bool free_fastpath(void *ptr, size_t size, bool size_hint) {
|
|||
}
|
||||
|
||||
tcache_t *tcache = tsd_tcachep_get(tsd);
|
||||
cache_bin_t *bin = tcache_small_bin_get(tcache, alloc_ctx.szind);
|
||||
cache_bin_t *bin = &tcache->bins[alloc_ctx.szind];
|
||||
|
||||
/*
|
||||
* If junking were enabled, this is where we would do it. It's not
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue