fix: usm reuse trim, non locked vector read
Remove checking allocations.empty before lock. Related-To: NEO-14529 Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
This commit is contained in:
parent
ccf4a0ff03
commit
7a091919a4
|
@ -236,9 +236,6 @@ void SVMAllocsManager::SvmAllocationCache::logCacheOperation(const SvmAllocation
|
|||
}
|
||||
|
||||
void SVMAllocsManager::SvmAllocationCache::trimOldAllocs(std::chrono::high_resolution_clock::time_point trimTimePoint, bool trimAll) {
|
||||
if (this->allocations.empty()) {
|
||||
return;
|
||||
}
|
||||
std::lock_guard<std::mutex> lock(this->mtx);
|
||||
auto allocCleanCandidateIndex = allocations.size();
|
||||
while (0u != allocCleanCandidateIndex) {
|
||||
|
|
Loading…
Reference in New Issue