mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-08-24 16:24:47 +03:00
use subproc_main for final statistics output to avoid dereferencing the heap
This commit is contained in:
parent
7c7ecf096f
commit
08b64e71a7
4 changed files with 7 additions and 4 deletions
|
@ -784,7 +784,7 @@ void mi_cdecl _mi_process_done(void) {
|
|||
//_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);
|
||||
_mi_stats_print(&_mi_subproc_main()->stats, NULL, NULL); // use always main subproc at process exit to avoid dereferencing the heap (as it may be destroyed by now)
|
||||
}
|
||||
_mi_allocator_done();
|
||||
_mi_verbose_message("process done: 0x%zx\n", tld_main.thread_id);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue