Skip to content

Commit 459eabd

Browse files
committed
fixup
1 parent a753024 commit 459eabd

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

lib/std/private/strmantle.nim

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -351,12 +351,3 @@ proc nimBoolToStr(x: bool): string {.compilerRtl.} =
351351
proc nimCharToStr(x: char): string {.compilerRtl.} =
352352
result = newString(1)
353353
result[0] = x
354-
355-
when defined(gcDestructors):
356-
proc GC_getStatistics*(): string =
357-
result = "[GC] total memory: "
358-
result.addInt getTotalMem()
359-
result.add "\n[GC] occupied memory: "
360-
result.addInt getOccupiedMem()
361-
result.add '\n'
362-
#"[GC] cycle collections: " & $gch.stat.cycleCollections & "\n" &

lib/system.nim

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2336,6 +2336,16 @@ when notJSnotNims and hasAlloc:
23362336

23372337
from std/private/strmantle import addInt, addFloat
23382338
export addInt, addFloat
2339+
2340+
when defined(gcDestructors):
2341+
proc GC_getStatistics*(): string =
2342+
result = "[GC] total memory: "
2343+
result.addInt getTotalMem()
2344+
result.add "\n[GC] occupied memory: "
2345+
result.addInt getOccupiedMem()
2346+
result.add '\n'
2347+
#"[GC] cycle collections: " & $gch.stat.cycleCollections & "\n" &
2348+
23392349
include "system/assign"
23402350

23412351
when not defined(nimV2):

0 commit comments

Comments
 (0)