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

Method getNumClassId

cachelib/allocator/memory/MemoryPool.h:289–291  ·  view source on GitHub ↗

return the number of allocation ClassIds for this pool based on the allocation sizes that it was configured with. All allocations from this pool will have ClassId from [0 .. numClassId - 1] (inclusive).

Source from the content-addressed store, hash-verified

287 // allocation sizes that it was configured with. All allocations from this
288 // pool will have ClassId from [0 .. numClassId - 1] (inclusive).
289 unsigned int getNumClassId() const noexcept {
290 return static_cast<unsigned int>(acSizes_.size());
291 }
292
293 // Gets allocation class for a given class id and calls forEachAllocation on
294 // that allocation class.

Callers 4

overridePoolConfigMethod · 0.80
createMMContainersMethod · 0.80
TEST_FFunction · 0.80
TEST_FFunction · 0.80

Calls 1

sizeMethod · 0.45

Tested by 2

TEST_FFunction · 0.64
TEST_FFunction · 0.64