summary refs log tree commit diff stats
path: root/tests/gc/gcleak2.nim
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2011-03-23 01:09:52 +0100
committerAraq <rumpf_a@web.de>2011-03-23 01:09:52 +0100
commit5b789f2da8e57ea2adf0c088f5e41fd7a71fe89b (patch)
tree81f2f23d48d56ef7b106d24982231d99809a6def /tests/gc/gcleak2.nim
parent8d734244b14e09c97267432468ac20fcf8ff82eb (diff)
downloadNim-5b789f2da8e57ea2adf0c088f5e41fd7a71fe89b.tar.gz
bugfixes; field discriminant checks; linearScanEnd, unroll, shallow pragmas
Diffstat (limited to 'tests/gc/gcleak2.nim')
-rwxr-xr-x[-rw-r--r--]tests/gc/gcleak2.nim9
1 files changed, 4 insertions, 5 deletions
diff --git a/tests/gc/gcleak2.nim b/tests/gc/gcleak2.nim
index 5ab9da7c9..f9a80f269 100644..100755
--- a/tests/gc/gcleak2.nim
+++ b/tests/gc/gcleak2.nim
@@ -7,14 +7,13 @@ proc MakeObj(): TTestObj =
   result.x = "Hello"
   result.s = @[1,2,3]
 
-#while true:
-#  var obj = MakeObj()
-#  echo GC_getstatistics()
-
 proc inProc() = 
-  while true:
+  for i in 1 .. 100_000_000:
     var obj: TTestObj
     obj = MakeObj()
+    if getOccupiedMem() > 300_000: quit("still a leak!")
 
 inProc()
+echo "no leak: ", getOccupiedMem()
+