Merged revisions 8137-8178 via svnmerge from
[cacao.git] / src / mm / boehm.c
index 7874228fd97d8550b6d63c330004b983b283d022..ebb9952ef75e395c19adc0a3d5808508ea9a2ced 100644 (file)
@@ -22,7 +22,7 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: boehm.c 7615 2007-03-29 23:10:59Z michi $
+   $Id: boehm.c 8179 2007-07-05 11:21:08Z michi $
 
 */
 
@@ -75,36 +75,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);
 }