MCPcopy Create free account
hub / github.com/facebook/CacheLib / getNumPages

Function getNumPages

cachelib/common/Utils.cpp:225–227  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

223}
224
225size_t getNumPages(size_t len) noexcept {
226 return (len + getPageSize() - 1) / getPageSize();
227}
228
229bool isPageAlignedAddr(const void* addr) noexcept {
230 return reinterpret_cast<uintptr_t>(addr) % getPageSize() == 0;

Callers 6

lockMemoryAsyncMethod · 0.85
SlabAllocator.cppFile · 0.85
TEST_FFunction · 0.85
testAdviseFunction · 0.85
testRestoreAndAdviseFunction · 0.85
getNumResidentPagesFunction · 0.85

Calls 1

getPageSizeFunction · 0.70

Tested by 3

TEST_FFunction · 0.68
testAdviseFunction · 0.68
testRestoreAndAdviseFunction · 0.68