[klibc] mmap and getpagesize
olh at suse.de
Tue Jan 27 15:01:55 PST 2004
On Sat, Jan 24, Jon Smirl wrote:
> The man page for mmap() says the size needs to be a multiple of getpagesize().
> So in my code I call getpagesize() and adjust my lengths accordingly. klibc
> doesn't have getpagesize() implemented. Is it safe to call mmap() with arbritary
> lengths and assume the mmap will round up for you? Does this work on glibc too?
> If so, I can just eliminate my getpagesize() code.
Why do you depend on PAGE_SIZE as a compiletime option? It does depend
on the used kernel .config on some architectures, like ia64. Current
klibc fails to compile because of that.
USB is for mice, FireWire is for men!
sUse lINUX ag, nÜRNBERG
More information about the klibc