mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-04-24 11:52:14 +03:00
Tcache: Add tcache gc delay option.
This can reduce flushing frequency for small size classes.
This commit is contained in:
parent
d338dd45d7
commit
ee72bf1cfd
4 changed files with 99 additions and 27 deletions
|
|
@ -9,6 +9,7 @@ extern unsigned opt_tcache_nslots_small_max;
|
|||
extern unsigned opt_tcache_nslots_large;
|
||||
extern ssize_t opt_lg_tcache_shift;
|
||||
extern size_t opt_tcache_gc_incr_bytes;
|
||||
extern size_t opt_tcache_gc_delay_bytes;
|
||||
|
||||
/*
|
||||
* Number of tcache bins. There are SC_NBINS small-object bins, plus 0 or more
|
||||
|
|
|
|||
|
|
@ -36,6 +36,11 @@ struct tcache_slow_s {
|
|||
uint8_t lg_fill_div[SC_NBINS];
|
||||
/* For small bins, whether has been refilled since last GC. */
|
||||
bool bin_refilled[SC_NBINS];
|
||||
/*
|
||||
* For small bins, the number of items we can pretend to flush before
|
||||
* actually flushing.
|
||||
*/
|
||||
uint8_t bin_flush_delay_items[SC_NBINS];
|
||||
/*
|
||||
* The start of the allocation containing the dynamic allocation for
|
||||
* either the cache bins alone, or the cache bin memory as well as this
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue