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

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


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

Log:
Set fred Linked_List_Header to 0 for simplify catching of errors.

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:11 2010	(r49651)
+++ branches/generational_gc/src/gc/gc_ms2.c	Sun Oct 24 21:08:21 2010	(r49652)
@@ -736,9 +736,10 @@
     tmp = self->root_objects->first;
     while (tmp) {
         List_Item_Header *next = tmp->next;
+        PMC *pmc = LLH2Obj_typed(tmp, PMC);
 
         LIST_REMOVE(self->root_objects, tmp);
-        LIST_APPEND(self->objects[PObj_to_generation(LLH2Obj_typed(tmp, PMC))], tmp);
+        LIST_APPEND(self->objects[PObj_to_generation(pmc)], tmp);
 
         tmp = next;
     }
@@ -1668,6 +1669,8 @@
             LIST_REMOVE(list, tmp);
             PObj_on_free_list_SET(obj);
             Parrot_gc_pool_free(interp, pool, tmp);
+
+            memset(tmp, 0, sizeof (List_Item_Header));
         }
         else {
             /* Remove "constant" objects from pool. We don't handle them */


More information about the parrot-commits mailing list