[svn:parrot] r47154 - branches/gc_massacre/src/gc
bacek at svn.parrot.org
bacek at svn.parrot.org
Sun May 30 14:52:49 UTC 2010
Author: bacek
Date: Sun May 30 14:52:49 2010
New Revision: 47154
URL: https://trac.parrot.org/parrot/changeset/47154
Log:
Initialize self.objects in constructor.
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 Sun May 30 14:50:58 2010 (r47153)
+++ branches/gc_massacre/src/gc/gc_tms.c Sun May 30 14:52:49 2010 (r47154)
@@ -456,7 +456,7 @@
Parrot_gc_tms_init(PARROT_INTERP)
{
ASSERT_ARGS(Parrot_gc_tms_init)
- struct TriColor_GC *gc_private;
+ struct TriColor_GC *self;
interp->gc_sys->do_gc_mark = gc_tms_mark_and_sweep;
interp->gc_sys->finalize_gc_system = NULL;
@@ -503,12 +503,13 @@
interp->gc_sys->get_gc_info = gc_tms_get_gc_info;
- gc_private = mem_allocate_zeroed_typed(TriColor_GC);
+ self = mem_allocate_zeroed_typed(TriColor_GC);
- gc_private->pmc_allocator = Parrot_gc_create_pool_allocator(
+ self->pmc_allocator = Parrot_gc_create_pool_allocator(
sizeof (List_Item_Header) + sizeof (PMC));
+ self->objects = Parrot_gc_allocate_linked_list(interp);
- interp->gc_sys->gc_private = gc_private;
+ interp->gc_sys->gc_private = self;
}
PARROT_MALLOC
More information about the parrot-commits
mailing list