Author: Armin Rigo <[email protected]>
Branch: c7-refactor
Changeset: r847:83904087abbc
Date: 2014-02-24 23:54 +0100
http://bitbucket.org/pypy/stmgc/changeset/83904087abbc/

Log:    Throw away the nursery upon abort

diff --git a/c7/stm/core.c b/c7/stm/core.c
--- a/c7/stm/core.c
+++ b/c7/stm/core.c
@@ -440,6 +440,9 @@
         assert(!"abort: bad transaction_state");
     }
 
+    /* throw away the content of the nursery */
+    throw_away_nursery();
+
     /* reset all the modified objects (incl. re-adding GCFLAG_WRITE_BARRIER) */
     reset_modified_from_other_segments();
 
diff --git a/c7/stm/nursery.c b/c7/stm/nursery.c
--- a/c7/stm/nursery.c
+++ b/c7/stm/nursery.c
@@ -147,7 +147,7 @@
     }
 }
 
-static void reset_nursery(void)
+static void throw_away_nursery(void)
 {
     /* reset the nursery by zeroing it */
     size_t size;
@@ -196,7 +196,7 @@
 
     collect_oldrefs_to_nursery();
 
-    reset_nursery();
+    throw_away_nursery();
 
     assert(list_is_empty(STM_PSEGMENT->objects_pointing_to_nursery));
 }
diff --git a/c7/stm/nursery.h b/c7/stm/nursery.h
--- a/c7/stm/nursery.h
+++ b/c7/stm/nursery.h
@@ -7,3 +7,4 @@
 
 static void minor_collection(bool commit);
 static void check_nursery_at_transaction_start(void);
+static void throw_away_nursery(void);
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to