There is some inconsistency in the documentation regarding the system page size.
According to documentation on virtual memory, the system page size is 4096 Bytes (4KB):
The 64-bit transition guide document states: "Never hard code the page size". The document recommends using getpagesize(), however getpagesize() is deprecated in POSIX and so I am using sysconf() instead.
https://developer.apple.com/library/ios/documentation/General/Conceptual/CocoaTouch64BitGuide/ConvertingYourAppto64-Bit/ConvertingYourAppto64-Bit.html#//apple_ref/doc/uid/TP40013501-CH3-SW1
size_t s = 4096; assert(sysconf(_SC_PAGESIZE) == (long)s);
I do not know the actual value returned by sysconf(), only that the assertion failure indicates that the page size is different to the documented size. This assertion passes on my iPhone5 and in the iPhone6 Plus simulator, but fails on a physical iPhone6 Plus device.
What is the correct way to determine the page size?