[klibc] Re: sys_mmap2 on different architectures
H. Peter Anvin
hpa at zytor.com
Wed Feb 22 16:05:39 PST 2006
David S. Miller wrote:
> On sparc32 we had the issue where we had a 8K page size
> platform (sun4) and the rest were using 4K page size.
> I can't even think why we do that fixed shift actually. I think Jakub
> Jalinek thought this might be a way to make applications assuming
> 4K page size work on the 8K page size machines.
> I'm going to say that you can feel free to fix this to use PAGE_SHIFT
> correctly all the time. Applications should be calling getpagesize()
> and not assume what that value might be.
Okay, what I'll do is that I'll hard-code 12 on i386, SPARC and ARM; on
other architectures I'll use getpagesize(). Of course, on 64-bit
architectures this is not an issue; there I just call sys_mmap.
More information about the klibc