This is the mail archive of the
mailing list for the GCC project.
Re: Give a better error for PCH with exec-shield-randomize
On Thu, Mar 04, 2004 at 12:59:38PM -0800, Geoff Keating wrote:
> 2. If mincore() doesn't work, it shouldn't be used. GGC is not the
> only source of anonymous mapped pages, libc can create them too
> (via malloc, for instance).
While I agree that mincore should work, one *can* get proper vma
information from /proc/self/maps. It should be easy enough to
have ggc-foo actively release all memory, then check the maps.
As for choosing a good place to allocate in the first place...
It ought to be trivial for the 64-bit targets to just hard-code
a host-specific value, e.g. 0x10000000000 for Alpha.
For x86, however, the memory map changes enough that I don't
know that there is an algorithm that *always* works. I might
guess that Ian's "allocate a large block" approach is as good