Re: hammer: MAP_32BIT

Andi Kleen (ak@muc.de)
Fri, 9 May 2003 13:38:45 +0200


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

> Sounds like your MAP_32BIT really is MAP_31BIT :-( which is too limiting.
> What about a more generic way of indicating which parts of the address
> space one wants? The simplest that would work for me is a single byte
> 'nrbits' specifying the target address space as [0 .. 2^nrbits-1].
> This could be specified on a per-mmap() basis or as a settable process attribute.

On x86-64 an mmap extension for that would be fine, but on i386 you get
problems because mmap64() already maxes out the argument limit and you
cannot add more.

You could only implement it with a structure in memory pointed to by an
argument, which would be ugly.

prctl is probably better. You really want [start; end] right ?

Pity that task_struct is already so bloated, so every new entry hurts.

-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/