Subject: Re: Add a MAP_ALIGNED flag for mmap(2).
To: Matt Thomas <matt@3am-software.com>
From: Andrew Brown <atatat@atatdot.net>
List: tech-kern
Date: 03/03/2003 00:45:59
>> >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.
>>
>>perhaps the alignment passed from userland could be considered the
>>"smallest desired" alignment.  certainly if you ask for something
>>aligned to 4k and you get something aligned to 8k, you haven't not
>>gotten what you wanted.
>
>Uh, that's aligned on a 4KB boundary so that's ok.

yes, it is.  but it's subtlely different.  i was just trying to make
the point that if an application asks for 1k aligned at 4k and them
another 1k aligned at 4k, both the resulting allocations will be
aligned at 4k, but will be 8k apart.  it's just...subtle.  that's all.

-- 
|-----< "CODE WARRIOR" >-----|
codewarrior@daemon.org             * "ah!  i see you have the internet
twofsonet@graffiti.com (Andrew Brown)                that goes *ping*!"
werdna@squooshy.com       * "information is power -- share the wealth."