Re: hammer: MAP_32BIT

Andi Kleen (ak@muc.de)
Fri, 9 May 2003 14:16:11 +0200


On Fri, May 09, 2003 at 01:52:17PM +0200, mikpe@csd.uu.se wrote:
> Andi Kleen writes:
> >
> > On Fri, May 09, 2003 at 01:28:11PM +0200, mikpe@csd.uu.se wrote:
> > > I have a potential use for mmap()ing in the low 4GB on x86_64.
> >
> > Just use MAP_32BIT
>
> Will that be corrected to use the full 4GB space? 2GB is too small.

That would break the X server.

But what you can do is to use mmap(0x1000, ....) and free the memory
again if the result is bigger than 4GB. If you pass an non zero value
as first argument but not MAP_FIXED it'll use the address argument
as starting point for the search.

-Andi
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/