Better handle burst allocation on tcache_alloc_small_hard

This commit is contained in:
Shirui Cheng 2024-08-22 14:50:08 -07:00 committed by Qi Wang
parent 0c88be9e0a
commit 7c99686165
3 changed files with 104 additions and 15 deletions

View file

@ -39,8 +39,8 @@ struct tcache_slow_s {
szind_t next_gc_bin;
szind_t next_gc_bin_small;
szind_t next_gc_bin_large;
/* For small bins, fill (ncached_max >> lg_fill_div). */
uint8_t lg_fill_div[SC_NBINS];
/* For small bins, help determine how many items to fill at a time. */
cache_bin_fill_ctl_t bin_fill_ctl_do_not_access_directly[SC_NBINS];
/* For small bins, whether has been refilled since last GC. */
bool bin_refilled[SC_NBINS];
/*