summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2018-01-21 10:59:09 +0100
committerAndreas Rumpf <rumpf_a@web.de>2018-01-21 10:59:09 +0100
commite5af08cc1244640ca57e2cf64dd1633b1f5fae46 (patch)
tree4083450dc67039174972d2cefd8265ccb24974f9
parentc99f952dfbce3a0b57958e02c992d98ca7dd0e83 (diff)
downloadNim-e5af08cc1244640ca57e2cf64dd1633b1f5fae46.tar.gz
GC add 'string' to dumpNumberOfInstances
-rw-r--r--lib/system/gc_common.nim5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/system/gc_common.nim b/lib/system/gc_common.nim
index 234b2c18a..d117c17da 100644
--- a/lib/system/gc_common.nim
+++ b/lib/system/gc_common.nim
@@ -38,6 +38,11 @@ when defined(nimTypeNames):
       if h == 1: break
 
   proc dumpNumberOfInstances* =
+    # also add the allocated strings to the list of known types:
+    if strDesc.nextType == nil:
+      strDesc.nextType = nimTypeRoot
+      strDesc.name = "string"
+      nimTypeRoot = addr strDesc
     var a: InstancesInfo
     var n = 0
     var it = nimTypeRoot