Subject: Re: Add a MAP_ALIGNED flag for mmap(2).
To: Nathan J. Williams <nathanw@wasabisystems.com>
From: Jason R Thorpe <thorpej@wasabisystems.com>
List: tech-kern
Date: 03/01/2003 09:30:56
On Sat, Mar 01, 2003 at 12:24:06PM -0500, Nathan J. Williams wrote:

 > I'll note that the same effect can be achieved by requesting a region
 > of size double-alignment (e.g. requesting a 2M region when you want 1M
 > alignment) and then using munmap() to trim the edges down to the
 > aligned region inside it. Less efficent, of course, but quite
 > possible.

Sure, that works for anon regions.  But to map a file won't you then
have to MAP_FIXED the file region over the anon region?  Seems like
a lot of work, esp. when the VM system already has a way to specify
alignment internally.

-- 
        -- Jason R. Thorpe <thorpej@wasabisystems.com>