Author: Remi Meier <[email protected]>
Branch: use-gcc
Changeset: r1942:25e30d665282
Date: 2015-08-17 17:53 +0200
http://bitbucket.org/pypy/stmgc/changeset/25e30d665282/

Log:    fix tests for f3b1d74a2633

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
@@ -325,9 +325,10 @@
         actual_big = (big + 15 ) & ~15
 
         self.start_transaction()
-        assert lib._stm_total_allocated() == 64 + (actual_big + LMO) # large 
malloc'd
+        # 4096 for 1 page of smallmalloc:
+        assert lib._stm_total_allocated() == 4096 + (actual_big + LMO) # large 
malloc'd
         stm_major_collect()
-        assert lib._stm_total_allocated() == 64 + (actual_big + LMO) # large 
malloc'd
+        assert lib._stm_total_allocated() == 4096 + (actual_big + LMO) # large 
malloc'd
         self.commit_transaction()
 
     def test_bug(self):
@@ -376,19 +377,19 @@
         assert lib._stm_total_allocated() == 0
         self.push_root(new)
         stm_minor_collect()
-        assert lib._stm_total_allocated() == 16
+        assert lib._stm_total_allocated() == 4096
 
         new = self.pop_root()
         assert not is_in_nursery(new)
         stm_minor_collect()
-        assert lib._stm_total_allocated() == 16
+        assert lib._stm_total_allocated() == 4096
 
         stm_major_collect()
         assert lib._stm_total_allocated() == 0
 
     def test_mixed_major_collections(self):
         import random
-        obj_sizes = [16, 48, 1024, 1000*8]
+        obj_sizes = [1024, 1000*8]
 
         self.start_transaction()
         random.seed(123)
@@ -398,11 +399,7 @@
         NOBJS = 100
         for _ in range(NOBJS):
             osize = random.choice(obj_sizes)
-            is_small = osize <= GC_LAST_SMALL_SIZE
-            if is_small:
-                allocated += osize
-            else:
-                allocated += osize + LMO
+            allocated += osize + LMO
 
             o = stm_allocate(osize)
             self.push_root(o)
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to