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

Method getObjectSize

cachelib/object_cache/ObjectCache.h:564–570  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

562 // 0 otherwise
563 template <typename T>
564 size_t getObjectSize(const std::shared_ptr<T>& object) const {
565 if (!object) {
566 return 0;
567 }
568 return getAlignedItemPtr(getReadHandleRefInternal<T>(object)->getMemory())
569 ->objectSize;
570 }
571
572 size_t getObjectSize(AccessIterator& itr) const {
573 if (!itr) {

Calls 1

getMemoryMethod · 0.45