[pypy-commit] stmgc c7-refactor: Fix: memset the right segment

arigo noreply at buildbot.pypy.org
Tue Feb 25 11:23:45 CET 2014


Author: Armin Rigo <arigo at tunes.org>
Branch: c7-refactor
Changeset: r858:fb13763ca5b2
Date: 2014-02-25 11:23 +0100
http://bitbucket.org/pypy/stmgc/changeset/fb13763ca5b2/

Log:	Fix: memset the right segment

diff --git a/c7/stm/nursery.c b/c7/stm/nursery.c
--- a/c7/stm/nursery.c
+++ b/c7/stm/nursery.c
@@ -310,10 +310,10 @@
     /* XXX force a minor/major collection if needed */
 
     char *result = allocate_outside_nursery_large(size_rounded_up);
-    memset(result, 0, size_rounded_up);
-
     object_t *o = (object_t *)(result - stm_object_pages);
     tree_insert(STM_PSEGMENT->young_outside_nursery, (intptr_t)o, 0);
+
+    memset(REAL_ADDRESS(STM_SEGMENT->segment_base, o), 0, size_rounded_up);
     return o;
 }
 


More information about the pypy-commit mailing list