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

Function numSlabs

cachelib/allocator/memory/SlabAllocator.cpp:330–332  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

328
329namespace {
330unsigned int numSlabs(size_t memorySize) noexcept {
331 return static_cast<unsigned int>(memorySize / sizeof(Slab));
332}
333unsigned int numSlabsForHeaders(size_t memorySize) noexcept {
334 const size_t headerSpace = sizeof(SlabHeader) * numSlabs(memorySize);
335 return static_cast<unsigned int>((headerSpace + sizeof(Slab) - 1) /

Callers 3

numSlabsForHeadersFunction · 0.85
getNumUsableSlabsMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected