mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-08-24 16:24:47 +03:00
ensure use of subproc_main during unsafe destroy to avoid derefercing the heap
This commit is contained in:
parent
a238d2bbbd
commit
7c7ecf096f
5 changed files with 28 additions and 24 deletions
|
@ -779,8 +779,9 @@ 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();
|
||||
_mi_page_map_unsafe_destroy(_mi_subproc_main());
|
||||
}
|
||||
//_mi_page_map_unsafe_destroy(_mi_subproc_main());
|
||||
|
||||
if (mi_option_is_enabled(mi_option_show_stats) || mi_option_is_enabled(mi_option_verbose)) {
|
||||
mi_stats_print(NULL);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue