| 391 | } |
| 392 | |
| 393 | void NvmLRUCache::FreeEntry(LRUHandle* e) { |
| 394 | DCHECK_EQ(ANNOTATE_UNPROTECTED_READ(e->refs), 0); |
| 395 | if (e->eviction_callback) { |
| 396 | e->eviction_callback->EvictedEntry(e->key(), e->value()); |
| 397 | } |
| 398 | if (PREDICT_TRUE(metrics_)) { |
| 399 | metrics_->cache_usage->DecrementBy(e->charge); |
| 400 | metrics_->evictions->Increment(); |
| 401 | } |
| 402 | CALL_MEMKIND(memkind_free, vmp_, e); |
| 403 | } |
| 404 | |
| 405 | // Allocate NVM memory. |
| 406 | void* NvmLRUCache::Allocate(size_t size) { |
nothing calls this directly
no test coverage detected