From 49c786331a4f7ef409437bd3c08202b5a5d73bed Mon Sep 17 00:00:00 2001 From: Andreas Rumpf Date: Thu, 21 Mar 2019 09:33:53 +0100 Subject: [PATCH] fixes -d:nimTypeNames leak detection regression --- lib/system/gc_common.nim | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/system/gc_common.nim b/lib/system/gc_common.nim index b86ef84f01..03cadaf907 100644 --- a/lib/system/gc_common.nim +++ b/lib/system/gc_common.nim @@ -61,15 +61,15 @@ when defined(nimTypeNames): inc totalAllocated, it.sizes sortInstances(a, n) 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) + c_fprintf(cstdout, "[Heap] %s: #%ld; bytes: %ld\n", a[i][0], a[i][1], a[i][2]) + c_fprintf(cstdout, "[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) + c_fprintf(cstdout, "[Heap] allocs/deallocs: %ld/%ld\n", allocs, deallocs) when defined(nimGcRefLeak): proc oomhandler() = - c_fprintf(stdout, "[Heap] ROOTS: #%ld\n", gch.additionalRoots.len) + c_fprintf(cstdout, "[Heap] ROOTS: #%ld\n", gch.additionalRoots.len) writeLeaks() outOfMemHook = oomhandler