version 1.1.1.2, 2000/04/14 11:07:57 |
version 1.1.1.3, 2000/12/01 14:48:23 |
|
|
} 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 321 register ptr_t list; |
|
Line 316 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 601 int report_if_found; /* Abort if a reclaimable object |
|
Line 595 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 631 int report_if_found; /* Abort if a reclaimable object |
|
Line 637 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 814 int report_if_found; /* Abort if a GC_reclaimable obj |
|
Line 832 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 |
|
|
} |
} |
|
|
|
|
* 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. |
*/ |
*/ |