[prev in list] [next in list] [prev in thread] [next in thread]
List: gcc
Subject: Re: PCH versus --enable-mapped-location
From: Geoffrey Keating <geoffk () geoffk ! org>
Date: 2005-03-31 23:52:01
Message-ID: m2is37gyqm.fsf () greed ! local
[Download RAW message or body]
Per Bothner <per@bothner.com> writes:
> Daniel Jacobowitz wrote:
> > That's exactly what Geoff said. There are two relevant properties of
> > GCed memory here:
> > - Anything in GCed memory will be saved to the PCH
> > - Anything in GCed memory will be overwritten by loading the PCH.
>
> So the corrollary: After a restore any pointers from non-gc'd memory to
> gc'd memory will be a dangling pointer, if we count static variables
> marked with GTY as "gc'd memory" in this context.
Yes. Don't keep pointers to GCed memory in non-GCed memory. The GC/PCH
machinery assumes that it can see all pointers to the objects it
allocates.
> Right now, as far as I can tell, the filenames in the line_table are
> allocated from non-gc'd memory. This complicates using gc.
This is the reverse case: pointers to non-GCed memory in GCed memory.
There is one case where this is allowed, which just happens to be the
case that you want: a pointer to a C string.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic