destroy the page map as well if MIMALLOC_DESTROY_ON_EXIT is set; see issue #1041

This commit is contained in:
daanx 2025-05-12 22:05:15 -07:00
parent 36e1cbfdbc
commit 3ef6784455
6 changed files with 43 additions and 5 deletions

View file

@ -780,6 +780,7 @@ void mi_cdecl _mi_process_done(void) {
mi_heap_collect(heap, true /* force */);
_mi_heap_unsafe_destroy_all(heap); // forcefully release all memory held by all heaps (of this thread only!)
_mi_arenas_unsafe_destroy_all(heap->tld);
_mi_page_map_unsafe_destroy();
}
if (mi_option_is_enabled(mi_option_show_stats) || mi_option_is_enabled(mi_option_verbose)) {