mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-04-16 07:31:48 +03:00
Use getpagesize(3) under FreeBSD.
This avoids sysctl(2) syscall during binary startup, using the value passed in the ELF aux vector instead. Signed-off-by: Edward Tomasz Napierala <trasz@FreeBSD.org>
This commit is contained in:
parent
58eba024c0
commit
d591df05c8
1 changed files with 2 additions and 0 deletions
|
|
@ -357,6 +357,8 @@ os_page_detect(void) {
|
|||
SYSTEM_INFO si;
|
||||
GetSystemInfo(&si);
|
||||
return si.dwPageSize;
|
||||
#elif defined(__FreeBSD__)
|
||||
return getpagesize();
|
||||
#else
|
||||
long result = sysconf(_SC_PAGESIZE);
|
||||
if (result == -1) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue