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:
Dominik Dabek 2025-05-19 13:47:13 +00:00 committed by Compute-Runtime-Automation
parent ccf4a0ff03
commit 7a091919a4
1 changed files with 0 additions and 3 deletions

View File

@ -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) {