[svn:parrot] r49556 - trunk/src/gc
chromatic at svn.parrot.org
chromatic at svn.parrot.org
Sat Oct 16 22:13:54 UTC 2010
Author: chromatic
Date: Sat Oct 16 22:13:54 2010
New Revision: 49556
URL: https://trac.parrot.org/parrot/changeset/49556
Log:
[GC] Reenbled global destruction in gc_ms2.
... but it's still skipped for threaded systems.
Modified:
trunk/src/gc/gc_ms2.c
Modified: trunk/src/gc/gc_ms2.c
==============================================================================
--- trunk/src/gc/gc_ms2.c Sat Oct 16 18:30:53 2010 (r49555)
+++ trunk/src/gc/gc_ms2.c Sat Oct 16 22:13:54 2010 (r49556)
@@ -547,7 +547,7 @@
struct MarkSweep_GC *self;
/* We have to transfer ownership of memory to parent interp in threaded parrot */
- interp->gc_sys->finalize_gc_system = NULL; /* gc_ms2_finalize; */
+ interp->gc_sys->finalize_gc_system = gc_ms2_finalize;
interp->gc_sys->do_gc_mark = gc_ms2_mark_and_sweep;
interp->gc_sys->compact_string_pool = gc_ms2_compact_memory_pool;
@@ -630,26 +630,33 @@
Parrot_gc_str_initialize(interp, &self->string_gc);
}
+
/*
+
=item C<static void gc_ms2_finalize(PARROT_INTERP)>
Finalize GC subsystem.
=cut
+
*/
+
static void
gc_ms2_finalize(PARROT_INTERP)
{
ASSERT_ARGS(gc_ms2_finalize)
- MarkSweep_GC *self = (MarkSweep_GC *)interp->gc_sys->gc_private;
- Parrot_gc_str_finalize(interp, &self->string_gc);
+ if (!interp->parent_interpreter) {
+ MarkSweep_GC *self = (MarkSweep_GC *)interp->gc_sys->gc_private;
+
+ Parrot_gc_str_finalize(interp, &self->string_gc);
- Parrot_list_destroy(interp, self->objects);
- Parrot_list_destroy(interp, self->strings);
- Parrot_gc_pool_destroy(interp, self->pmc_allocator);
- Parrot_gc_pool_destroy(interp, self->string_allocator);
- Parrot_gc_fixed_allocator_destroy(interp, self->fixed_size_allocator);
+ Parrot_list_destroy(interp, self->objects);
+ Parrot_list_destroy(interp, self->strings);
+ Parrot_gc_pool_destroy(interp, self->pmc_allocator);
+ Parrot_gc_pool_destroy(interp, self->string_allocator);
+ Parrot_gc_fixed_allocator_destroy(interp, self->fixed_size_allocator);
+ }
}
PARROT_MALLOC
More information about the parrot-commits
mailing list