This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: GC changes
- To: Tim Josling <tej at melbpc dot org dot au>
- Subject: Re: GC changes
- From: Jamie Lokier <egcs at tantalophile dot demon dot co dot uk>
- Date: Sun, 14 Jan 2001 22:36:18 +0100
- Cc: Geoff Keating <geoffk at geoffk dot org>, gcc at gcc dot gnu dot org
- References: <3A5E18C1.1D23DEE1@melbpc.org.au>
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