MCPcopy Create free account
hub / github.com/apple/foundationdb / evict

Method evict

fdbrpc/AsyncFileEncrypted.actor.cpp:229–234  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

227}
228
229size_t AsyncFileEncrypted::RandomCache::evict() {
230 ASSERT_EQ(vec.size(), maxSize);
231 auto index = deterministicRandom()->randomInt(0, maxSize);
232 hashMap.erase(vec[index]);
233 return index;
234}
235
236AsyncFileEncrypted::RandomCache::RandomCache(size_t maxSize) : maxSize(maxSize) {
237 vec.reserve(maxSize);

Callers 1

~AsyncFileCachedMethod · 0.45

Calls 4

deterministicRandomFunction · 0.85
sizeMethod · 0.45
randomIntMethod · 0.45
eraseMethod · 0.45

Tested by

no test coverage detected