This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PCH support on Solaris
- From: "Bonzini" <bonzini at gnu dot org>
- To: "Ulrich Weigand" <weigand at immd1 dot informatik dot uni-erlangen dot de>,"Eric Botcazou" <ebotcazou at libertysurf dot fr>
- Cc: <geoffk at geoffk dot org>,<gcc-patches at gcc dot gnu dot org>
- Date: Sat, 5 Apr 2003 20:28:33 +0200
- Subject: Re: PCH support on Solaris
- References: <200304052129.XAA16716@faui11.informatik.uni-erlangen.de>
> 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