* Removed all Id tags.
[cacao.git] / src / mm / boehm.c
index cf9148d616fb224c844b38e666b455ae92494ee6..bae18f2b59ea148845ea3d7ac8f01d41c5a415f7 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: boehm.c 7309 2007-02-09 12:51:00Z twisti $
-
 */
 
 
@@ -74,36 +72,39 @@ void gc_init(u4 heapmaxsize, u4 heapstartsize)
 {
        size_t heapcurrentsize;
 
-       GC_INIT();
+       /* just to be sure (should be set to 1 by JAVA_FINALIZATION macro) */
 
-       /* set the maximal heap size */
+       GC_java_finalization = 1;
 
-       GC_set_max_heap_size(heapmaxsize);
+       /* Ignore pointers that do not point to the start of an object. */
 
-       /* set the initial heap size */
+       GC_all_interior_pointers = 0;
 
-       heapcurrentsize = GC_get_heap_size();
+       /* suppress warnings */
 
-       if (heapstartsize > heapcurrentsize) {
-               GC_expand_hp(heapstartsize - heapcurrentsize);
-       }
+       GC_set_warn_proc(gc_ignore_warnings);
+
+       /* install a GC notifier */
+
+       GC_finalize_on_demand = 1;
+       GC_finalizer_notifier = finalizer_notify;
 
        /* define OOM function */
 
        GC_oom_fn = gc_out_of_memory;
 
-       /* just to be sure (should be set to 1 by JAVA_FINALIZATION macro) */
+       GC_INIT();
 
-       GC_java_finalization = 1;
+       /* set the maximal heap size */
 
-       /* suppress warnings */
+       GC_set_max_heap_size(heapmaxsize);
 
-       GC_set_warn_proc(gc_ignore_warnings);
+       /* set the initial heap size */
 
-       /* install a GC notifier */
+       heapcurrentsize = GC_get_heap_size();
 
-       GC_finalize_on_demand = 1;
-       GC_finalizer_notifier = finalizer_notify;
+       if (heapstartsize > heapcurrentsize)
+               GC_expand_hp(heapstartsize - heapcurrentsize);
 }
 
 
@@ -148,7 +149,7 @@ void *heap_allocate(u4 bytelength, u4 references, methodinfo *finalizer)
                return NULL;
 
        if (finalizer != NULL)
-               GC_REGISTER_FINALIZER(p, finalizer_run, 0, 0, 0);
+               GC_REGISTER_FINALIZER_NO_ORDER(p, finalizer_run, 0, 0, 0);
 
        /* clear allocated memory region */