mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-07-06 19:38:41 +03:00
implement arena destroy on program exit
This commit is contained in:
parent
4c4f2f4084
commit
83aa635485
3 changed files with 82 additions and 22 deletions
|
@ -158,7 +158,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_arena_collect(false,true,&heap->tld->stats);
|
||||
_mi_arena_collect(false /* destroy arenas */, true /* force purge */, &heap->tld->stats);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue