From 9753782f96bcd9b35a4c45d6cb20de2a85c33e55 Mon Sep 17 00:00:00 2001 From: Andreas Rumpf Date: Fri, 13 Jan 2017 12:07:19 +0100 Subject: memory allocator hotfix: do not allocate tremendous amounts of memory --- compiler/main.nim | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'compiler') diff --git a/compiler/main.nim b/compiler/main.nim index e6563f281..888f89ad5 100644 --- a/compiler/main.nim +++ b/compiler/main.nim @@ -271,9 +271,13 @@ proc mainCommand*(graph: ModuleGraph; cache: IdentCache) = if msgs.gErrorCounter == 0 and gCmd notin {cmdInterpret, cmdRun, cmdDump}: + when declared(system.getMaxMem): + let usedMem = formatSize(getMaxMem()) & " peekmem" + else: + let usedMem = formatSize(getTotalMem()) rawMessage(hintSuccessX, [$gLinesCompiled, formatFloat(epochTime() - gLastCmdTime, ffDecimal, 3), - formatSize(getTotalMem()), + usedMem, if condSyms.isDefined("release"): "Release Build" else: "Debug Build"]) -- cgit 1.4.1-2-gfad0