void LargeObjectCacheImpl<Props>::putList(ExtMemoryPool *extMemPool, LargeMemoryBlock *toCache) { int toBinIdx = sizeToIdx(toCache->unalignedSize); MALLOC_ITT_SYNC_RELEASING(bin+toBinIdx); if (LargeMemoryBlock *release = bin[toBinIdx].putList(extMemPool, toCache, &bitMask, toBinIdx)) extMemPool->backend.returnLargeObject(release); }
bool LargeObjectCache::put(ExtMemoryPool *extMemPool, LargeMemoryBlock *largeBlock) { size_t idx = sizeToIdx(largeBlock->unalignedSize); if (idx<numLargeBlockBins) { MALLOC_ITT_SYNC_RELEASING(bin+idx); if (bin[idx].put(extMemPool, largeBlock)) { STAT_increment(getThreadId(), ThreadCommonCounters, cacheLargeBlk); return true; } else return false; } return false; }