[klibc] Re: sys_mmap2 on different architectures

David S. Miller davem at davemloft.net
Wed Feb 22 16:41:27 PST 2006


From: "H. Peter Anvin" <hpa at zytor.com>
Date: Wed, 22 Feb 2006 16:05:39 -0800

> 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.

Oh and BTW if you use 12 it will break when executing on a
64-bit kernel, where PAGE_SHIFT is variable and starting at
13.



More information about the klibc mailing list