mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-04-14 14:41:42 +03:00
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
1 changed files with 6 additions and 0 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue