Boehm now uses a config.h instead of -D defines to force a recompilation
[cacao.git] / src / boehm-gc / mark.c
index ca947290291b880de35b19d2ca2a632476fd4322..74142fc377872a4dc59ef302d0d370a0b8ba1aae 100644 (file)
@@ -15,6 +15,7 @@
  *
  */
 
+#include "config.h"
 
 # include <stdio.h>
 # include "private/gc_pmark.h"
@@ -558,8 +559,8 @@ register hdr *hhdr, **new_hdr_p;
              current = current - HBLKSIZE*(word)hhdr;
              hhdr = HDR(current);
            } while(IS_FORWARDING_ADDR_OR_NIL(hhdr));
-           /* current points to the start of the large object */
-           if (hhdr -> hb_flags & IGNORE_OFF_PAGE) return(0);
+           /* current points to near the start of the large object */
+           if (hhdr -> hb_flags & IGNORE_OFF_PAGE) return(orig);
            if ((word *)orig - (word *)current
                 >= (ptrdiff_t)(hhdr->hb_sz)) {
                /* Pointer past the end of the block */
@@ -684,7 +685,7 @@ mse * mark_stack_limit;
               current = *current_p;
              FIXUP_POINTER(current);
              if ((ptr_t)current >= least_ha && (ptr_t)current < greatest_ha) {
-               PREFETCH(current);
+               PREFETCH((ptr_t)current);
                 HC_PUSH_CONTENTS((ptr_t)current, mark_stack_top,
                              mark_stack_limit, current_p, exit1);
              }
@@ -760,7 +761,7 @@ mse * mark_stack_limit;
          FIXUP_POINTER(deferred);
          limit = (word *)((char *)limit - ALIGNMENT);
          if ((ptr_t)deferred >= least_ha && (ptr_t)deferred <  greatest_ha) {
-           PREFETCH(deferred);
+           PREFETCH((ptr_t)deferred);
            break;
          }
          if (current_p > limit) goto next_object;
@@ -770,7 +771,7 @@ mse * mark_stack_limit;
          FIXUP_POINTER(deferred);
          limit = (word *)((char *)limit - ALIGNMENT);
          if ((ptr_t)deferred >= least_ha && (ptr_t)deferred <  greatest_ha) {
-           PREFETCH(deferred);
+           PREFETCH((ptr_t)deferred);
            break;
          }
          if (current_p > limit) goto next_object;
@@ -787,7 +788,7 @@ mse * mark_stack_limit;
         if ((ptr_t)current >= least_ha && (ptr_t)current <  greatest_ha) {
          /* Prefetch the contents of the object we just pushed.  It's  */
          /* likely we will need them soon.                             */
-         PREFETCH(current);
+         PREFETCH((ptr_t)current);
           HC_PUSH_CONTENTS((ptr_t)current, mark_stack_top,
                           mark_stack_limit, current_p, exit2);
         }
@@ -1739,7 +1740,7 @@ register hdr * hhdr;
 {
     register int sz = hhdr -> hb_sz;
     
-    if (sz < MAXOBJSZ) {
+    if (sz <= MAXOBJSZ) {
          return(GC_page_was_dirty(h));
     } else {
         register ptr_t p = (ptr_t)h;