Author: Armin Rigo <[email protected]>
Branch: c5
Changeset: r579:6994d62df796
Date: 2013-12-20 17:35 +0100
http://bitbucket.org/pypy/stmgc/changeset/6994d62df796/

Log:    A test for insert_unsorted() which I initially forgot in
        stm_largemalloc_resize_arena().

diff --git a/c5/test/test_largemalloc.py b/c5/test/test_largemalloc.py
--- a/c5/test/test_largemalloc.py
+++ b/c5/test/test_largemalloc.py
@@ -68,6 +68,15 @@
         assert r == 1
         lib._stm_large_dump()
 
+    def test_resize_arena_reduce_3(self):
+        d1 = lib.stm_large_malloc(128)
+        r = lib.stm_largemalloc_resize_arena(self.size // 2)
+        assert r == 1
+        d2 = lib.stm_large_malloc(128)
+        assert d1 == self.rawmem + 16
+        assert d2 == d1 + 128 + 16
+        lib._stm_large_dump()
+
     def test_resize_arena_cannot_reduce_1(self):
         lib.stm_large_malloc(self.size // 2)
         r = lib.stm_largemalloc_resize_arena(self.size // 2)
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to