OSDN Git Service

* Makefile.in (CXX_FOR_TARGET_FOR_RECURSIVE_MAKE, RECURSE_FLAGS):
[pf3gnuchains/gcc-fork.git] / boehm-gc / reclaim.c
index 1847e59..4ace110 100644 (file)
@@ -29,13 +29,8 @@ word sz;
     } else {
         GC_err_printf0("Leaked composite object at ");
     }
-    if (GC_debugging_started && GC_has_debug_info(p)) {
-        GC_print_obj(p);
-    } else {
-        GC_err_printf2("0x%lx (appr. size = %ld)\n",
-                             (unsigned long)p,
-                             (unsigned long)WORDS_TO_BYTES(sz));
-    }
+    GC_print_heap_obj(p);
+    GC_err_printf0("\n");
 }
 
 #   define FOUND_FREE(hblk, word_no) \
@@ -241,18 +236,9 @@ register word sz;
                /* Clear object, advance p to next object in the process */
                    q = p + sz;
                     p++; /* Skip link field */
-#                  if defined(SMALL_CONFIG) && defined(ALIGN_DOUBLE)
-                     /* We assert that sz must be even */
-                     *p++ = 0;
-                     while (p < q) {
-                       CLEAR_DOUBLE(p);
-                       p += 2;
-                     }
-#                  else
-                      while (p < q) {
+                    while (p < q) {
                        *p++ = 0;
-                     }
-#                  endif
+                   }
            }
            word_no += sz;
        }
@@ -609,20 +595,32 @@ int report_if_found;              /* Abort if a reclaimable object is found */
       switch(sz) {
 #      ifndef SMALL_CONFIG
         case 1:
-           full = GC_block_nearly_full1(hhdr, 0xffffffffl);
+#           if CPP_WORDSZ == 64
+             full = GC_block_nearly_full1(hhdr, 0xffffffffffffffffl);
+#          else
+             full = GC_block_nearly_full1(hhdr, 0xffffffffl);
+#          endif
            if (TRUE == full) goto out;
            if (FALSE == full) GC_write_hint(hbp);
            /* In the DONT_KNOW case, we let reclaim fault.     */
             *flh = GC_reclaim1(hbp, hhdr, *flh);
             break;
         case 2:
-           full = GC_block_nearly_full1(hhdr, 0x55555555l);
+#           if CPP_WORDSZ == 64
+             full = GC_block_nearly_full1(hhdr, 0x5555555555555555l);
+#          else
+             full = GC_block_nearly_full1(hhdr, 0x55555555l);
+#          endif
            if (TRUE == full) goto out;
            if (FALSE == full) GC_write_hint(hbp);
             *flh = GC_reclaim_clear2(hbp, hhdr, *flh);
             break;
         case 4:
-           full = GC_block_nearly_full1(hhdr, 0x11111111l);
+#           if CPP_WORDSZ == 64
+             full = GC_block_nearly_full1(hhdr, 0x1111111111111111l);
+#          else
+             full = GC_block_nearly_full1(hhdr, 0x11111111l);
+#          endif
            if (TRUE == full) goto out;
            if (FALSE == full) GC_write_hint(hbp);
             *flh = GC_reclaim_clear4(hbp, hhdr, *flh);
@@ -639,19 +637,31 @@ int report_if_found;              /* Abort if a reclaimable object is found */
       switch(sz) {
 #      ifndef SMALL_CONFIG
         case 1:
-           full = GC_block_nearly_full1(hhdr, 0xffffffffl);
+#           if CPP_WORDSZ == 64
+             full = GC_block_nearly_full1(hhdr, 0xffffffffffffffffl);
+#          else
+             full = GC_block_nearly_full1(hhdr, 0xffffffffl);
+#          endif
            if (TRUE == full) goto out;
            if (FALSE == full) GC_write_hint(hbp);
             *flh = GC_reclaim1(hbp, hhdr, *flh);
             break;
         case 2:
-           full = GC_block_nearly_full1(hhdr, 0x55555555l);
+#           if CPP_WORDSZ == 64
+             full = GC_block_nearly_full1(hhdr, 0x5555555555555555l);
+#          else
+             full = GC_block_nearly_full1(hhdr, 0x55555555l);
+#          endif
            if (TRUE == full) goto out;
            if (FALSE == full) GC_write_hint(hbp);
             *flh = GC_reclaim_uninit2(hbp, hhdr, *flh);
             break;
         case 4:
-           full = GC_block_nearly_full1(hhdr, 0x11111111l);
+#           if CPP_WORDSZ == 64
+             full = GC_block_nearly_full1(hhdr, 0x1111111111111111l);
+#          else
+             full = GC_block_nearly_full1(hhdr, 0x11111111l);
+#          endif
            if (TRUE == full) goto out;
            if (FALSE == full) GC_write_hint(hbp);
             *flh = GC_reclaim_uninit4(hbp, hhdr, *flh);