Author: Remi Meier <[email protected]>
Branch: 
Changeset: r1744:575d288a77d3
Date: 2015-04-01 10:26 +0200
http://bitbucket.org/pypy/stmgc/changeset/575d288a77d3/

Log:    add an assert for the stm_write_card fastpath

diff --git a/c8/stm/nursery.c b/c8/stm/nursery.c
--- a/c8/stm/nursery.c
+++ b/c8/stm/nursery.c
@@ -106,7 +106,6 @@
             /* case "small enough" */
             nobj = (object_t *)allocate_outside_nursery_small(size);
         }
-
         //dprintf(("move %p -> %p\n", obj, nobj));
 
         /* copy the object */
@@ -143,6 +142,9 @@
     /* Must trace the object later */
     LIST_APPEND(STM_PSEGMENT->objects_pointing_to_nursery, nobj_sync_now);
     _cards_cleared_in_object(get_priv_segment(STM_SEGMENT->segment_num), nobj, 
true);
+
+    assert(IMPLY(obj_should_use_cards(STM_SEGMENT->segment_base, nobj),
+                 (((uintptr_t)nobj) & 15) == 0));
 }
 
 static void _cards_cleared_in_object(struct stm_priv_segment_info_s *pseg, 
object_t *obj,
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to