wip: initial work on purgable arenas

This commit is contained in:
Daan Leijen 2023-03-31 20:51:35 -07:00
parent 7cf60deb12
commit 595add5e3d
7 changed files with 65 additions and 42 deletions

View file

@ -159,6 +159,7 @@ static void mi_heap_collect_ex(mi_heap_t* heap, mi_collect_t collect)
// collect regions on program-exit (or shared library unload)
if (collect >= MI_FORCE && _mi_is_main_thread() && mi_heap_is_backing(heap)) {
_mi_mem_collect(&heap->tld->os);
_mi_arena_collect(false,true,&heap->tld->stats);
}
}