Author: Remi Meier <remi.me...@inf.ethz.ch>
Branch: c8-private-pages
Changeset: r1540:0ad00b13789a
Date: 2015-01-16 16:57 +0100
http://bitbucket.org/pypy/stmgc/changeset/0ad00b13789a/

Log:    first failing test for smallmalloc during major gc

diff --git a/c8/test/test_gcpage.py b/c8/test/test_gcpage.py
--- a/c8/test/test_gcpage.py
+++ b/c8/test/test_gcpage.py
@@ -328,3 +328,18 @@
         stm_major_collect()
         #
         py.test.raises(Conflict, self.switch, 1)
+
+    def test_small_major_collection(self):
+        self.start_transaction()
+        new = stm_allocate(16)
+        self.push_root(new)
+        stm_minor_collect()
+        assert lib._stm_total_allocated() == 16
+
+        new = self.pop_root()
+        assert not is_in_nursery(new)
+        stm_minor_collect()
+        assert lib._stm_total_allocated() == 16
+
+        stm_major_collect()
+        assert lib._stm_total_allocated() == 0
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to