mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-04-18 08:31:46 +03:00
Pre-generate ncached_max for all bins for better tcache_max tuning experience.
This commit is contained in:
parent
36becb1302
commit
6b197fdd46
12 changed files with 417 additions and 308 deletions
|
|
@ -4140,7 +4140,8 @@ batch_alloc(void **ptrs, size_t num, size_t size, int flags) {
|
|||
tcache_t *tcache = tcache_get_from_ind(tsd, tcache_ind,
|
||||
/* slow */ true, /* is_alloc */ true);
|
||||
if (likely(tcache != NULL &&
|
||||
ind < tcache_nhbins_get(tcache)) && progress < batch) {
|
||||
!tcache_bin_disabled(ind, &tcache->bins[ind],
|
||||
tcache->tcache_slow)) && progress < batch) {
|
||||
if (bin == NULL) {
|
||||
bin = &tcache->bins[ind];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue