Subject: Re: Add a MAP_ALIGNED flag for mmap(2).
To: Bill Studenmund <>
From: Jason R Thorpe <>
List: tech-kern
Date: 03/02/2003 13:17:12
On Sun, Mar 02, 2003 at 12:25:18PM -0800, Bill Studenmund wrote:

 > While I see the purity of adding an extra argument, I like the idea of
 > using flags. We have a good number open, and using them would mean not
 > changing a lot of called routines.

I guess I don't really care enough about the purity of the extra argument
to put up much of a fight :-)

 > I also like listing the alignment in terms of bytes, not pages, since it
 > means userland code doesn't care what the internal page size is. Also it
 > might help emulation if future systems raise the page size (like say we go
 > from 4k to 8k or 8k to 16k as part of a CPU transition) - we don't have to
 > keep track of the implicit page size.

Yah, I definitely think it should be in bytes.  I must admit that the log2
use of the flags argument is a clever hack :-)

        -- Jason R. Thorpe <>