Tcache: Hold cache bin allocation explicitly.

This commit is contained in:
David Goldblatt
2020-03-02 18:28:17 -08:00
committed by David Goldblatt
parent d498a4bb08
commit 0a2fcfac01
2 changed files with 20 additions and 27 deletions

View File

@@ -49,6 +49,12 @@ struct tcache_s {
uint8_t lg_fill_div[SC_NBINS];
/* For small bins, whether has been refilled since last GC. */
bool bin_refilled[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
* tcache_t.
*/
void *dyn_alloc;
/*
* We put the cache bins for large size classes at the end of the
* struct, since some of them might not get used. This might end up