GC changes

Jamie Lokier egcs@tantalophile.demon.co.uk
Sun Jan 14 13:37:00 GMT 2001


Tim Josling wrote:
> 2. What is a good way to make things GC proof for a while until
> they get into the main tree structure? At the moment I define
> various roots to handle the intermediate allocations. 

You might try implementing conservative roots.  I think it's quite easy
to get access to all the pointers stored in registers and on the stack:
just call setjmp.  As a comment in some code says, "Callee-saved
registers are recorded in buf [setjmp(buf)]; caller-saved registers are
on the stack already.".

-- Jamie


More information about the Gcc mailing list