[svn:parrot] r44400 - in branches/boehm_gc_2/src: . gc

bacek at svn.parrot.org bacek at svn.parrot.org
Tue Feb 23 19:49:10 UTC 2010


Author: bacek
Date: Tue Feb 23 19:49:09 2010
New Revision: 44400
URL: https://trac.parrot.org/parrot/changeset/44400

Log:
Initialize and disable Boehm GC in main to prevent affecting other GC implementations

Modified:
   branches/boehm_gc_2/src/gc/gc_boehm.c
   branches/boehm_gc_2/src/main.c

Modified: branches/boehm_gc_2/src/gc/gc_boehm.c
==============================================================================
--- branches/boehm_gc_2/src/gc/gc_boehm.c	Tue Feb 23 19:48:49 2010	(r44399)
+++ branches/boehm_gc_2/src/gc/gc_boehm.c	Tue Feb 23 19:49:09 2010	(r44400)
@@ -603,6 +603,9 @@
     //GC_enable_incremental();
     //GC_time_limit = GC_TIME_UNLIMITED;
 
+    /* GC is disabled in src/main.c. So reenable it */
+    GC_enable();
+
     /* Alias for gc_sys */
     GC_Subsystem *gc_sys = interp->gc_sys;
 

Modified: branches/boehm_gc_2/src/main.c
==============================================================================
--- branches/boehm_gc_2/src/main.c	Tue Feb 23 19:48:49 2010	(r44399)
+++ branches/boehm_gc_2/src/main.c	Tue Feb 23 19:49:09 2010	(r44400)
@@ -30,6 +30,10 @@
 /* For gc_sys_type_enum */
 #include "gc/gc_private.h"
 
+#ifdef PARROT_HAS_BOEHM_GC
+#  include <gc.h>
+#endif
+
 /* HEADERIZER HFILE: none */
 
 /* HEADERIZER BEGIN: static */
@@ -104,6 +108,12 @@
     Interp     *interp;
     int         status;
 
+#ifdef PARROT_HAS_BOEHM_GC
+    GC_init();
+    /* To stop affecting other GC */
+    GC_disable();
+#endif
+
     Parrot_Run_core_t  core  = PARROT_SLOW_CORE;
     Parrot_trace_flags trace = PARROT_NO_TRACE;
 


More information about the parrot-commits mailing list