On Monday 09 June 2008 09:33:20 [EMAIL PROTECTED] wrote:
> Modified: branches/gsoc_pdd09/src/gc/gc_it.c
> --- branches/gsoc_pdd09/src/gc/gc_it.c (original)
> +++ branches/gsoc_pdd09/src/gc/gc_it.c Mon Jun 9 09:33:19 2008
> @@ -83,6 +83,7 @@
> * 4) repeat (3) until there are no grey items in current pool/generation
> * 5) mark all objects grey that appear in IGP lists. Repeat (1) - (4) for
> these * 6) Add all items that are still white to the free list
> + * 7) Scan through simple buffers, add white objects to free list
> * 7) reset all flags to white
> *
> * Only reclaim objects where there are no greys in the current area,
> @@ -91,6 +92,51 @@
> * back to white (which would free all objects, alive or dead).
> */
>
> + if (arena_base->DOD_block_level) {
> + return;
> + }
> + ++arena_base->DOD_block_level;
> + if(flags && GC_finish_FLAG) {
> + /* If we have a finish situation, we need to finalize all PMCs
> + that have a custom finalization routine. We'll do this in a
> + subroutine to reduce clutter here */
> + gc_it_finalize_all_pmc(interp);
> + --arena_base->DOD_block_level;
> + }
> +
> + Arenas * arena_base = interp->arena_base;
> + Gc_it_data * gc_priv_data = (Gc_it_data)(arena_base->gc_private);
> + Small_object_pool * cur_pool; /* Current pool */
> + Gc_it_gen * generation; /* Current generation */
> +
Careful here; C89 forbids declarations after code.
> + GC_trace_stack_FLAG = we need to trace the C stack and the processor
> + registers too. I wouldn't even know how to start doing this.
See src/cpu_dep.c, specifically trace_system_areas(). If you understand that
at anything lower than the 10,000 foot view, documentation would be lovely.
-- c