added ttables2 to gather data about issue #183

This commit is contained in:
Araq
2012-08-22 22:54:53 +02:00
parent f893179889
commit 5f0bbb911f
2 changed files with 22 additions and 1 deletions

View File

@@ -1,6 +1,6 @@
discard """
output: '''true'''
cmd: "nimrod cc --gc:none --hints:on $# $#"
cmd: "nimrod cc --hints:on $# $#"
"""
import hashes, tables

21
tests/run/ttables2.nim Normal file
View File

@@ -0,0 +1,21 @@
discard """
output: '''true'''
cmd: "nimrod cc --hints:on $# $#"
"""
import tables
proc TestHashIntInt() =
var tab = initTable[int,int]()
for i in 1..1_000_000:
tab[i] = i
for i in 1..1_000_000:
var x = tab[i]
if x != i : echo "not found ", i
proc run1() = # occupied Memory stays constant, but
for i in 1 .. 50: # aborts at run: 44 on win32 with 3.2GB with out of memory
TestHashIntInt()
run1()
echo "true"