Restore a FreeBSD-specific getpagesize(3) optimization.
It was removed in 0771ff2cea
.
Add a comment explaining its purpose.
This commit is contained in:
parent
cd2931ad9b
commit
a4c6b9ae01
@ -419,6 +419,12 @@ os_page_detect(void) {
|
||||
SYSTEM_INFO si;
|
||||
GetSystemInfo(&si);
|
||||
return si.dwPageSize;
|
||||
#elif defined(__FreeBSD__)
|
||||
/*
|
||||
* This returns the value obtained from
|
||||
* the auxv vector, avoiding a syscall.
|
||||
*/
|
||||
return getpagesize();
|
||||
#else
|
||||
long result = sysconf(_SC_PAGESIZE);
|
||||
if (result == -1) {
|
||||
|
Loading…
Reference in New Issue
Block a user