mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-07-24 09:37:22 +03:00
Optimize cache_bin_alloc_easy for malloc fast path
`tcache_bin_info` is not accessed on malloc fast path but the compiler reserves a register for it, as well as an additional register for `tcache_bin_info[ind].stack_size`. The optimization gets rid of the need for the two registers.
This commit is contained in:
parent
4fe50bc7d0
commit
05681e387a
2 changed files with 36 additions and 10 deletions
|
|
@ -2372,7 +2372,7 @@ je_malloc(size_t size) {
|
|||
|
||||
cache_bin_t *bin = tcache_small_bin_get(tcache, ind);
|
||||
bool tcache_success;
|
||||
void *ret = cache_bin_alloc_easy(bin, &tcache_success, ind);
|
||||
void *ret = cache_bin_alloc_easy_reduced(bin, &tcache_success);
|
||||
|
||||
if (tcache_success) {
|
||||
*tsd_thread_allocatedp_get(tsd) += usize;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue