[pypy-svn] r16022 - pypy/dist/pypy/rpython/memory/test

cfbolz at codespeak.net cfbolz at codespeak.net
Fri Aug 12 21:59:27 CEST 2005


Author: cfbolz
Date: Fri Aug 12 21:59:26 2005
New Revision: 16022

Modified:
   pypy/dist/pypy/rpython/memory/test/test_gc.py
Log:
test for last checkin.

The checkin message of the last checkin should have been:

changed convertllype so that the gc can also handle programs where
globals contain root pointers. Global constants now have two words for
the GC reserved as well.


Modified: pypy/dist/pypy/rpython/memory/test/test_gc.py
==============================================================================
--- pypy/dist/pypy/rpython/memory/test/test_gc.py	(original)
+++ pypy/dist/pypy/rpython/memory/test/test_gc.py	Fri Aug 12 21:59:26 2005
@@ -131,3 +131,17 @@
         res = interpret(malloc_a_lot, [])
         assert simulator.current_size - curr < 16000
         print "size before: %s, size after %s" % (curr, simulator.current_size)
+
+    def test_global_list(self):
+        curr = simulator.current_size
+        lst = []
+        def append_to_list(i, j):
+            lst.append([i] * 500)
+            return lst[j][0]
+        res = interpret(append_to_list, [0, 0])
+        assert res == 0
+        for i in range(1, 15):
+            res = interpret(append_to_list, [i, i - 1])
+            assert res == i - 1# crashes if constants are not considered roots
+            
+            



More information about the Pypy-commit mailing list