dbgalloc_print_memory_reportΒΆ
dbgalloc_print_memory_report :: fn (dump_leaks: )
Print memory report. First block contains currently allocated bytes and current count of allocations. Optional memory leak dump block (enabled by dump_leaks argument) contains:
[allocation serial ID] - <file>:<line> (allocation size in bytes)
$ ./out.exe
******************* MEMORY REPORT ******************
* Allocated 64 Bytes.
* Count of allocations 1.
****************************************************
Dump memory leaks begin:
[1] - test.bl:10 (64 bytes)
Dump memory leaks end.
Note
Printed report contains all remaining (not freed) allocations in time when function was called. Memory leaks can contain false-positives when function is called before execution end.
Hint
Allocation serail ID can be used by dbgalloc_break_on to interrupt execution before memory is allocated and eventually localize allocation in debbuger.
Declared in: debug_allocator.bl