mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-08-25 16:54:47 +03:00
small fixes
This commit is contained in:
parent
6b6a8a2315
commit
a0d7a9d94d
2 changed files with 5 additions and 5 deletions
|
@ -608,13 +608,13 @@ void mi_heap_print_json(mi_heap_t* heap, mi_output_fun* out, void* arg) {
|
|||
|
||||
bool mi_heap_is_empty(mi_heap_t* heap) {
|
||||
if (heap==NULL) heap = mi_heap_get_default();
|
||||
mi_collect(false);
|
||||
mi_heap_collect(heap,false);
|
||||
return (heap->page_count == 0);
|
||||
}
|
||||
|
||||
void mi_heap_check_leak(mi_heap_t* heap, mi_output_fun* out, void* arg) {
|
||||
if (!mi_heap_is_empty(heap)) {
|
||||
_mi_fprintf(out,arg,"mimalloc: potential memory leak detected. Current heap blocks:\n");
|
||||
_mi_fprintf(out,arg,"mimalloc: potential memory leak detected; current heap blocks:\n");
|
||||
mi_heap_print_json(heap, out, arg);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue