From 8e137e8702037adbf6b86b90115660d515955cfa Mon Sep 17 00:00:00 2001 From: Ioannis Assiouras Date: Wed, 31 Jul 2024 16:43:32 +0100 Subject: [PATCH] SWDEV-476460 - Fix for a race condition in SysmemPool::Alloc Change-Id: Ia94709e68b236c9460589963c0f09ec1f481c306 --- rocclr/platform/object.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rocclr/platform/object.hpp b/rocclr/platform/object.hpp index 73e167c2c7..c55225be27 100644 --- a/rocclr/platform/object.hpp +++ b/rocclr/platform/object.hpp @@ -260,7 +260,7 @@ private: }; std::atomic current_alloc_ = 0; //!< Current allocation, global index - size_t max_chunk_idx_ = 0; //!< Current max chunk index + std::atomic max_chunk_idx_ = 0; //!< Current max chunk index amd::Monitor chunk_access_; //!< Lock for the chunk list access std::set chunks_; //!< List of allocated memory chunks T* active_allocs_[kActiveAllocSize] = {}; //!< Active chunks for fast access