[BACK]Return to reclaim.c CVS log [TXT][DIR] Up to [local] / OpenXM_contrib2 / asir2000 / gc

Diff for /OpenXM_contrib2/asir2000/gc/reclaim.c between version 1.3 and 1.4

version 1.3, 2000/04/13 06:01:02 version 1.4, 2000/12/01 09:26:13
Line 31  word sz;
Line 31  word sz;
     } else {      } else {
         GC_err_printf0("Leaked composite object at ");          GC_err_printf0("Leaked composite object at ");
     }      }
     if (GC_debugging_started && GC_has_debug_info(p)) {      GC_print_heap_obj(p);
         GC_print_obj(p);      GC_err_printf0("\n");
     } else {  
         GC_err_printf2("0x%lx (appr. size = %ld)\n",  
                       (unsigned long)p,  
                       (unsigned long)WORDS_TO_BYTES(sz));  
     }  
 }  }
   
 #   define FOUND_FREE(hblk, word_no) \  #   define FOUND_FREE(hblk, word_no) \
Line 323  register ptr_t list;
Line 318  register ptr_t list;
             p[start_displ] = (word)list; \              p[start_displ] = (word)list; \
             list = (ptr_t)(p+start_displ); \              list = (ptr_t)(p+start_displ); \
             p[start_displ+1] = 0; \              p[start_displ+1] = 0; \
             p[start_displ+2] = 0; \              CLEAR_DOUBLE(p + start_displ + 2); \
             p[start_displ+3] = 0; \  
             INCR_WORDS(4); \              INCR_WORDS(4); \
         }          }
   
Line 603  int report_if_found;  /* Abort if a reclaimable object
Line 597  int report_if_found;  /* Abort if a reclaimable object
       switch(sz) {        switch(sz) {
 #      ifndef SMALL_CONFIG  #      ifndef SMALL_CONFIG
         case 1:          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 (TRUE == full) goto out;
             if (FALSE == full) GC_write_hint(hbp);              if (FALSE == full) GC_write_hint(hbp);
             /* In the DONT_KNOW case, we let reclaim fault.     */              /* In the DONT_KNOW case, we let reclaim fault.     */
             *flh = GC_reclaim1(hbp, hhdr, *flh);              *flh = GC_reclaim1(hbp, hhdr, *flh);
             break;              break;
         case 2:          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 (TRUE == full) goto out;
             if (FALSE == full) GC_write_hint(hbp);              if (FALSE == full) GC_write_hint(hbp);
             *flh = GC_reclaim_clear2(hbp, hhdr, *flh);              *flh = GC_reclaim_clear2(hbp, hhdr, *flh);
             break;              break;
         case 4:          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 (TRUE == full) goto out;
             if (FALSE == full) GC_write_hint(hbp);              if (FALSE == full) GC_write_hint(hbp);
             *flh = GC_reclaim_clear4(hbp, hhdr, *flh);              *flh = GC_reclaim_clear4(hbp, hhdr, *flh);
Line 633  int report_if_found;  /* Abort if a reclaimable object
Line 639  int report_if_found;  /* Abort if a reclaimable object
       switch(sz) {        switch(sz) {
 #      ifndef SMALL_CONFIG  #      ifndef SMALL_CONFIG
         case 1:          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 (TRUE == full) goto out;
             if (FALSE == full) GC_write_hint(hbp);              if (FALSE == full) GC_write_hint(hbp);
             *flh = GC_reclaim1(hbp, hhdr, *flh);              *flh = GC_reclaim1(hbp, hhdr, *flh);
             break;              break;
         case 2:          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 (TRUE == full) goto out;
             if (FALSE == full) GC_write_hint(hbp);              if (FALSE == full) GC_write_hint(hbp);
             *flh = GC_reclaim_uninit2(hbp, hhdr, *flh);              *flh = GC_reclaim_uninit2(hbp, hhdr, *flh);
             break;              break;
         case 4:          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 (TRUE == full) goto out;
             if (FALSE == full) GC_write_hint(hbp);              if (FALSE == full) GC_write_hint(hbp);
             *flh = GC_reclaim_uninit4(hbp, hhdr, *flh);              *flh = GC_reclaim_uninit4(hbp, hhdr, *flh);
Line 816  int report_if_found;  /* Abort if a GC_reclaimable obj
Line 834  int report_if_found;  /* Abort if a GC_reclaimable obj
   /* Go through all heap blocks (in hblklist) and reclaim unmarked objects */    /* Go through all heap blocks (in hblklist) and reclaim unmarked objects */
   /* or enqueue the block for later processing.                            */    /* or enqueue the block for later processing.                            */
     GC_apply_to_all_blocks(GC_reclaim_block, (word)report_if_found);      GC_apply_to_all_blocks(GC_reclaim_block, (word)report_if_found);
   
   # ifdef EAGER_SWEEP
       /* This is a very stupid thing to do.  We make it possible anyway,  */
       /* so that you can convince yourself that it really is very stupid. */
       GC_reclaim_all((GC_stop_func)0, FALSE);
   # endif
   
 }  }
   
Line 855  int kind;
Line 879  int kind;
  * Abort and return FALSE when/if (*stop_func)() returns TRUE.   * Abort and return FALSE when/if (*stop_func)() returns TRUE.
  * If this returns TRUE, then it's safe to restart the world   * If this returns TRUE, then it's safe to restart the world
  * with incorrectly cleared mark bits.   * with incorrectly cleared mark bits.
  * If ignore_old is TRUE, then reclain only blocks that have been   * If ignore_old is TRUE, then reclaim only blocks that have been
  * recently reclaimed, and discard the rest.   * recently reclaimed, and discard the rest.
  * Stop_func may be 0.   * Stop_func may be 0.
  */   */

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>