[svn:parrot] r49651 - branches/generational_gc/src/gc

bacek at svn.parrot.org bacek at svn.parrot.org
Sun Oct 24 21:08:11 UTC 2010


Author: bacek
Date: Sun Oct 24 21:08:11 2010
New Revision: 49651
URL: https://trac.parrot.org/parrot/changeset/49651

Log:
Switch on valiadationf of generation after bringing them together.

Modified:
   branches/generational_gc/src/gc/gc_ms2.c

Modified: branches/generational_gc/src/gc/gc_ms2.c
==============================================================================
--- branches/generational_gc/src/gc/gc_ms2.c	Sun Oct 24 21:08:01 2010	(r49650)
+++ branches/generational_gc/src/gc/gc_ms2.c	Sun Oct 24 21:08:11 2010	(r49651)
@@ -933,7 +933,7 @@
 
     gc_ms2_check_sanity(interp);
 
-#if 0
+#if 1
     // DEBUG ONLY. Simple recursive check
     interp->gc_sys->mark_pmc_header = gc_ms2_pmc_validate;
     interp->gc_sys->mark_str_header = gc_ms2_string_validate;
@@ -1017,7 +1017,7 @@
     if (PObj_constant_TEST(s))
         return;
 
-    PARROT_ASSERT(pobj2gen((PMC *)s) == self->current_generation);
+    PARROT_ASSERT(pobj2gen((PObj *)s) >= self->current_generation);
 }
 
 /*
@@ -1254,13 +1254,14 @@
     if (PObj_is_live_or_free_TESTALL(pmc) || PObj_constant_TEST(pmc))
         return;
 
+    /* mark it live. Even if it's from older generation we can have link
+     * _from_ young object which should keep it alive */
+    PObj_live_SET(pmc);
+
     /* If object too old - skip it */
     if (gen > self->current_generation)
         return;
 
-    /* mark it live */
-    PObj_live_SET(pmc);
-
     LIST_REMOVE(self->objects[gen], item);
     LIST_APPEND(self->root_objects, item);
 }


More information about the parrot-commits mailing list