From: hboehm Date: Fri, 17 Nov 2006 05:37:13 +0000 (+0000) Subject: 2006-11-16 Hans Boehm (really mostly Bruce Hoult) X-Git-Tag: gc7_0alpha9~23 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=986fc66d0b1d4c7b72bfbe8db7abf2a2ec69d472;p=gc 2006-11-16 Hans Boehm (really mostly Bruce Hoult) * doc/README.Mac: Clarify that this file is mostly obsolete. * reclaim.c (GC_print_free_list): New debug function. --- diff --git a/doc/README.Mac b/doc/README.Mac index 04f46825..ae9c1d5e 100644 --- a/doc/README.Mac +++ b/doc/README.Mac @@ -1,3 +1,8 @@ +The contents of this file are old and pertain to pre-MacOSX versions. +You probably really wanted README.darwin. + +--------------------------------------------- + Patrick Beard's Notes for building GC v4.12 with CodeWarrior Pro 2: ---------------------------------------------------------------------------- The current build environment for the collector is CodeWarrior Pro 2. diff --git a/reclaim.c b/reclaim.c index 0ef7213f..b1ff6b75 100644 --- a/reclaim.c +++ b/reclaim.c @@ -433,6 +433,25 @@ void GC_print_block_list() (unsigned long)pstats.total_bytes); } +/* Currently for debugger use only: */ +void GC_print_free_list(int kind, size_t sz_in_granules) +{ + struct obj_kind * ok = &GC_obj_kinds[kind]; + ptr_t flh = ok -> ok_freelist[sz_in_granules]; + struct hblk *lastBlock = 0; + int n = 0; + + while (flh){ + struct hblk *block = HBLKPTR(flh); + if (block != lastBlock){ + GC_printf("\nIn heap block at 0x%x:\n\t", block); + lastBlock = block; + } + GC_printf("%d: 0x%x;", ++n, flh); + flh = obj_link(flh); + } +} + #endif /* NO_DEBUGGING */ /*