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

Method getCurrentUsedSize

cachelib/allocator/memory/MemoryPool.cpp:167–170  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

165}
166
167size_t MemoryPool::getCurrentUsedSize() const noexcept {
168 LockHolder l(lock_);
169 return currSlabAllocSize_ + freeSlabs_.size() * Slab::kSize;
170}
171
172AllocationClass& MemoryPool::getAllocationClassFor(uint32_t size) const {
173 const auto classId = getAllocationClassId(size);

Callers 4

getPoolUsedSlabsMethod · 0.80
TYPED_TESTFunction · 0.80

Calls 1

sizeMethod · 0.45

Tested by 2

TYPED_TESTFunction · 0.64