Both in general and with regard to cross-platform support, is one function -- getpagesize() vs. sysconf(_SC_PAGESIZE) -- more reliable than the other?
getpagesize() vs. sysconf(_SC_PAGESIZE)
Asked Answered
After some additional searching, I've discovered that getpagesize()
was deprecated in POSIX issue 6, and removed in POSIX issue 7. It's recommended to use sysconf(_SC_PAGESIZE)
instead.
© 2022 - 2024 — McMap. All rights reserved.
man getpagesize
says: "In SUSv2 the getpagesize() call is labeled LEGACY, and in POSIX.1-2001 it has been dropped" and: "Portable applications should employ sysconf(_SC_PAGESIZE) instead of getpagesize()" – Inhalator