forked from bartvdbraak/blender
Report total unfreed memory size on exit
Previously only number of unfreed blocks would have been printed, which might not be totally enough during investigation process.
This commit is contained in:
parent
6c5f63b476
commit
b5a14c381c
@ -537,7 +537,10 @@ void WM_exit_ext(bContext *C, const bool do_python)
|
||||
BLI_threadapi_exit();
|
||||
|
||||
if (MEM_get_memory_blocks_in_use() != 0) {
|
||||
printf("Error: Not freed memory blocks: %d\n", MEM_get_memory_blocks_in_use());
|
||||
size_t mem_in_use = MEM_get_memory_in_use() + MEM_get_memory_in_use();
|
||||
printf("Error: Not freed memory blocks: %d, total unfreed memory %f MB\n",
|
||||
MEM_get_memory_blocks_in_use(),
|
||||
(double)mem_in_use / 1024 / 1024);
|
||||
MEM_printmemlist();
|
||||
}
|
||||
wm_autosave_delete();
|
||||
|
Loading…
Reference in New Issue
Block a user