[svn:parrot] r47329 - branches/gc_massacre/src/gc
bacek at svn.parrot.org
bacek at svn.parrot.org
Thu Jun 3 10:30:26 UTC 2010
Author: bacek
Date: Thu Jun 3 10:30:26 2010
New Revision: 47329
URL: https://trac.parrot.org/parrot/changeset/47329
Log:
Speed-up testing on TMS.is_pmc by checking "pmc" flags.
Modified:
branches/gc_massacre/src/gc/gc_tms.c
Modified: branches/gc_massacre/src/gc/gc_tms.c
==============================================================================
--- branches/gc_massacre/src/gc/gc_tms.c Thu Jun 3 10:29:52 2010 (r47328)
+++ branches/gc_massacre/src/gc/gc_tms.c Thu Jun 3 10:30:26 2010 (r47329)
@@ -705,6 +705,7 @@
while (tmp) {
List_Item_Header *next = tmp->next;
PARROT_ASSERT(tmp->owner == self->dead_objects);
+ PObj_on_free_list_SET(LLH2Obj_typed(tmp, PMC));
Parrot_gc_pool_free(self->pmc_allocator, tmp);
tmp = next;
++counter;
@@ -840,6 +841,10 @@
if (!Parrot_gc_pool_is_owned(self->pmc_allocator, item))
return 0;
+ /* black or grey objects marked already. Dead objects are dead */
+ if (PObj_grey_TEST(pmc) || PObj_live_TEST(pmc) || PObj_on_free_list_TEST(pmc))
+ return 0;
+
/* Pool.is_owned isn't precise enough (yet) */
if (Parrot_gc_list_is_owned(interp, self->dead_objects, item))
return 1;
More information about the parrot-commits
mailing list