[Pixman] [PATCH] Replace the non-standard call to getpagesize() by POSIX sysconf()
sandmann at daimi.au.dk
Mon Sep 27 20:52:47 PDT 2010
Dmitri Vorobiev <dmitri.vorobiev at movial.com> writes:
> Unlike sysconf(_SC_PAGESIZE), getpagesize() is not in POSIX. So,
> let's use the former and be closer to the standard.
I suspect getpagesize() is actually more widely available, especially
considering that there is confusion about whether the constant is
called _SC_PAGESIZE or _SC_PAGE_SIZE. Is there a specific system you
know of where getpagesize() doesn't exist?
> While at it, this patch also removes an unnecessary typecast of
> MAP_FAILED, replaces an erroneous free() by the correct munmap()
> in the error path for a failing mprotect(), and, finally, removes
> redundant calls to mprotect() that aren't necessary, because
> munmap() doesn't call for any specific memory protection.
All of this makes sense to me though.
More information about the Pixman