From 7a091919a43b51379bc87ed1877a2c41a44d0626 Mon Sep 17 00:00:00 2001 From: Dominik Dabek Date: Mon, 19 May 2025 13:47:13 +0000 Subject: [PATCH] fix: usm reuse trim, non locked vector read Remove checking allocations.empty before lock. Related-To: NEO-14529 Signed-off-by: Dominik Dabek --- shared/source/memory_manager/unified_memory_manager.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/shared/source/memory_manager/unified_memory_manager.cpp b/shared/source/memory_manager/unified_memory_manager.cpp index eef79d11a4..c80fcfd298 100644 --- a/shared/source/memory_manager/unified_memory_manager.cpp +++ b/shared/source/memory_manager/unified_memory_manager.cpp @@ -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 lock(this->mtx); auto allocCleanCandidateIndex = allocations.size(); while (0u != allocCleanCandidateIndex) {