void *getBackRef(BackRefIdx backRefIdx) { // !backRefMaster means no initialization done, so it can't be valid memory // see addEmptyBackRefBlock for fences around lastUsed if (!FencedLoad((intptr_t&)backRefMaster) || backRefIdx.getMaster() > FencedLoad(backRefMaster->lastUsed) || backRefIdx.getOffset() >= BR_MAX_CNT) return NULL; return *(void**)((uintptr_t)backRefMaster->backRefBl[backRefIdx.getMaster()] + sizeof(BackRefBlock)+backRefIdx.getOffset()*sizeof(void*)); }
bool ExtMemoryPool::softCachesCleanup() { // TODO: cleanup small objects as well return loc.regularCleanup(this, FencedLoad((intptr_t&)loCacheStat.age)); }
bool LargeObjectCache::regularCleanup() { return doCleanup(FencedLoad((intptr_t&)cacheCurrTime), /*doThreshDecr=*/false); }
bool LargeObjectCache::decreasingCleanup() { return doCleanup(FencedLoad((intptr_t&)cacheCurrTime), /*doThreshDecr=*/true); }