PCH support on Solaris

Bonzini bonzini@gnu.org
Sat Apr 5 22:03:00 GMT 2003


> In any case, I guess the current solution should work well enough for
> practical purposes; my only reason for speaking up in this thread
> was simply to point out that *if* you need to reimplement the Linux
> behaviour of mmap on Solaris, there is a way to do so in a 100%
> compatible manner using mincore checks followed by MAP_FIXED.  If
> this turns out to be not required, so much the better.

Do you mean that this code under Solaris

size = 1048576
guess = mmap (NULL, size, PROT_NONE,
    MAP_ANONYMOUS|MAP_PRIVATE, -1, 0);
munmap (guess, size);
addr = mmap (guess+4096, size-4096, PROT_NONE,
    MAP_ANONYMOUS|MAP_PRIVATE, -1, 0);
printf ("%x %x\n", guess, addr);

gives the same address for both guess and size?  That is, that Solaris completely
ignores the first argument unless MAP_FIXED is given?

If so, my idea is useless at least under Solaris.  But if not, I don't see your point.

Paolo



More information about the Gcc-patches mailing list