MCPcopy Create free account
hub / github.com/F-Stack/f-stack / os_page_detect

Function os_page_detect

app/redis-6.2.6/deps/jemalloc/src/pages.c:387–402  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

385
386
387static size_t
388os_page_detect(void) {
389#ifdef _WIN32
390 SYSTEM_INFO si;
391 GetSystemInfo(&si);
392 return si.dwPageSize;
393#elif defined(__FreeBSD__)
394 return getpagesize();
395#else
396 long result = sysconf(_SC_PAGESIZE);
397 if (result == -1) {
398 return LG_PAGE;
399 }
400 return (size_t)result;
401#endif
402}
403
404#ifdef JEMALLOC_SYSCTL_VM_OVERCOMMIT
405static bool

Callers 1

pages_bootFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected