use frac 8 for reclaim_on_free and reabandon; halve full_page_retain if running in a threadpool

This commit is contained in:
daanx 2024-12-11 16:26:39 -08:00
parent 1c8d15abac
commit ccf5e36e6b
5 changed files with 13 additions and 3 deletions

View file

@ -409,6 +409,7 @@ struct mi_heap_s {
size_t page_retired_max; // largest retired index into the `pages` array.
mi_heap_t* next; // list of heaps per thread
mi_memid_t memid; // provenance of the heap struct itseft (meta or os)
long full_page_retain; // how many full pages can be retained per queue (before abondoning them)
bool allow_page_reclaim; // `true` if this heap should not reclaim abandoned pages
bool allow_page_abandon; // `true` if this heap can abandon pages to reduce memory footprint
uint8_t tag; // custom tag, can be used for separating heaps based on the object types