This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PCH support on Solaris
> It's me who's lost now. :-) If I understand it correctly, you are saying
> that on one hand giving mmi.preferred_base to the /dev/zero memory mapping
> is useless, on the other hand it "just works".
Both assertions are exact.
> This is playing with fire about as much as the current, not working, code;
> you should really use Ulrich's idea.
I don't see why this is "playing with fire". The heuristics is based on the
assumption that the preferred base address on saving the PCH file is valid
as a base address for mmap on loading the PCH file. For Solaris, we
implicitly add another assumption: that the preferred base address on
saving the PCH file is the preferred base address on loading the PCH file.
Are they not equivalent in most cases? That is, why would the preferred
address on loading the PCH file be different from the preferred address on
saving the PCH file if not because the preferred address on loading the PCH
file is not a valid base address for mmap any more?
--
Eric Botcazou