initial abandon based on fine-grained reclamation

This commit is contained in:
daan 2020-01-23 19:50:35 -08:00
parent f8ab4bd7dc
commit 4a2a0c2d50
5 changed files with 289 additions and 138 deletions

View file

@ -125,7 +125,7 @@ static void mi_heap_collect_ex(mi_heap_t* heap, mi_collect_t collect)
{
// the main thread is abandoned (end-of-program), try to reclaim all abandoned segments.
// if all memory is freed by now, all segments should be freed.
_mi_segment_try_reclaim_abandoned(heap, true, &heap->tld->segments);
_mi_abandoned_reclaim_all(heap, &heap->tld->segments);
}