MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / EvictMemoryRegion

Method EvictMemoryRegion

tensorflow/contrib/gdr/gdr_memory_manager.cc:602–611  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

600}
601
602void GdrMemoryManager::EvictMemoryRegion(void* addr, size_t length) {
603 if (length == 0) return;
604 mutex_lock l(alloc_mu_);
605 auto iter = std::upper_bound(mrs_.begin(), mrs_.end(), addr, &Comparator);
606 if (iter != std::end(mrs_) && iter->get()->addr == addr) {
607 mrs_.erase(iter);
608 } else {
609 LOG(WARNING) << "Failed to de-register memory region";
610 }
611}
612
613} // namespace
614

Callers

nothing calls this directly

Calls 5

upper_boundFunction · 0.85
beginMethod · 0.45
endMethod · 0.45
getMethod · 0.45
eraseMethod · 0.45

Tested by

no test coverage detected