diff options
Diffstat (limited to 'lib/system/gc_common.nim')
-rw-r--r-- | lib/system/gc_common.nim | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/system/gc_common.nim b/lib/system/gc_common.nim index 711a610bf..dcea0c4cc 100644 --- a/lib/system/gc_common.nim +++ b/lib/system/gc_common.nim @@ -57,6 +57,9 @@ when defined(nimTypeNames): for i in 0 .. n-1: c_fprintf(stdout, "[Heap] %s: #%ld; bytes: %ld\n", a[i][0], a[i][1], a[i][2]) c_fprintf(stdout, "[Heap] total number of bytes: %ld\n", totalAllocated) + when defined(nimTypeNames): + let (allocs, deallocs) = getMemCounters() + c_fprintf(stdout, "[Heap] allocs/deallocs: %ld/%ld\n", allocs, deallocs) when defined(nimGcRefLeak): proc oomhandler() = |