added ttables2 to gather data about issue #183
This commit is contained in:
parent
f893179889
commit
5f0bbb911f
2 changed files with 22 additions and 1 deletions
|
|
@ -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
21
tests/run/ttables2.nim
Normal 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"
|
||||
Loading…
Add table
Add a link
Reference in a new issue