mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-24 12:23:05 +08:00
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:
committed by
Compute-Runtime-Automation
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) {
|
||||
|
||||
Reference in New Issue
Block a user