Browse files

Add memtest3.py, a test that actually kicks python into gc mode

  • Loading branch information...
1 parent d585f4b commit 88d73688232e833e8e70cce4088d840d4870b3b4 @apenwarr committed Oct 6, 2011
Showing with 17 additions and 0 deletions.
  1. +3 −0 memtests/Makefile
  2. +14 −0 memtests/memtest3.py
View
3 memtests/Makefile
@@ -41,6 +41,9 @@ test.csv: compile
./runtests ./memtest2 >>$@.new
./runtests ./go-memtest2 >>$@.new
+ echo >>$@.new
+ ./runtests python ./memtest3.py >>$@.new
+
mv $@.new $@
clean:
View
14 memtests/memtest3.py
@@ -0,0 +1,14 @@
+#!/usr/bin/python
+import time
+
+INNER = 10000
+LOOPS = 1*1000*1000
+
+time.sleep(1)
+
+aa = {}
+for i in xrange(LOOPS):
+ a = ['\0'*INNER, None]
+ b = ['\0'*INNER, a]
+ a[1] = b
+ aa[i % 1000] = a

0 comments on commit 88d7368

Please sign in to comment.