Subject: Re: Add a MAP_ALIGNED flag for mmap(2).
To: Matt Thomas <matt@3am-software.com>
From: Jason R Thorpe <thorpej@wasabisystems.com>
List: tech-kern
Date: 02/28/2003 20:13:09
On Fri, Feb 28, 2003 at 06:01:47PM -0800, Matt Thomas wrote:
> Currently, ld.elf_so doesn't honor the alignment specified in a
> ELF file's psections. This is due to the lack of ability to request
> an aligned block of addresses from mmap(2). I propose we add a
> MAP_ALIGNED flag which would mean that the addr argument to mmap(2)
> would be the required alignment of the block. Supplying both
> MAP_ALIGNED|MAP_FIXED would cause an error EINVAL to be returned.
>
> Any thought on this proposal?
Sounds good. I'm a little concerned that it means you can't pass a
"please map it in this general neighborhood of the address space", but
I definitely want the ability to specify alignment.
One question -- what happens if mmap can't satisfy the alignment
contraint? Is it just a hint or a strict requirement?
--
-- Jason R. Thorpe <thorpej@wasabisystems.com>