@@ -115,7 +115,6 @@ GraphicsAllocation *MemoryManager::allocateGraphicsMemoryForSVM(size_t size, boo
115115}
116116
117117GraphicsAllocation *MemoryManager::allocateGraphicsMemory (size_t size, const void *ptr, bool forcePin) {
118- std::lock_guard<decltype (mtx)> lock (mtx);
119118 if (deferredDeleter) {
120119 deferredDeleter->drain (true );
121120 }
@@ -148,17 +147,14 @@ void MemoryManager::freeSystemMemory(void *ptr) {
148147}
149148
150149void MemoryManager::storeAllocation (std::unique_ptr<GraphicsAllocation> gfxAllocation, uint32_t allocationUsage) {
151- std::lock_guard<decltype (mtx)> lock (mtx);
152150 getCommandStreamReceiver (0 )->getInternalAllocationStorage ()->storeAllocation (std::move (gfxAllocation), allocationUsage);
153151}
154152
155153void MemoryManager::storeAllocation (std::unique_ptr<GraphicsAllocation> gfxAllocation, uint32_t allocationUsage, uint32_t taskCount) {
156- std::lock_guard<decltype (mtx)> lock (mtx);
157154 getCommandStreamReceiver (0 )->getInternalAllocationStorage ()->storeAllocationWithTaskCount (std::move (gfxAllocation), allocationUsage, taskCount);
158155}
159156
160157std::unique_ptr<GraphicsAllocation> MemoryManager::obtainReusableAllocation (size_t requiredSize, bool internalAllocation) {
161- std::lock_guard<decltype (mtx)> lock (mtx);
162158 return getCommandStreamReceiver (0 )->getInternalAllocationStorage ()->obtainReusableAllocation (requiredSize, internalAllocation);
163159}
164160
@@ -186,13 +182,11 @@ void MemoryManager::applyCommonCleanup() {
186182}
187183
188184bool MemoryManager::cleanAllocationList (uint32_t waitTaskCount, uint32_t allocationUsage) {
189- std::lock_guard<decltype (mtx)> lock (mtx);
190185 getCommandStreamReceiver (0 )->getInternalAllocationStorage ()->cleanAllocationsList (waitTaskCount, allocationUsage);
191186 return false ;
192187}
193188
194189void MemoryManager::freeAllocationsList (uint32_t waitTaskCount, AllocationsList &allocationsList) {
195- std::lock_guard<decltype (mtx)> lock (mtx);
196190 getCommandStreamReceiver (0 )->getInternalAllocationStorage ()->freeAllocationsList (waitTaskCount, allocationsList);
197191}
198192
0 commit comments