From 54deded929203a64555d97424d5bb4b884fff69f Mon Sep 17 00:00:00 2001 From: gdkchan Date: Thu, 5 May 2022 14:58:59 -0300 Subject: Fix shared memory leak on Windows (#3319) * Fix shared memory leak on Windows * Fix memory leak caused by RO session disposal not decrementing the memory manager ref count * Fix UnmapViewInternal deadlock * Was not supposed to add those back --- Ryujinx.Memory/MemoryBlock.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Ryujinx.Memory/MemoryBlock.cs') diff --git a/Ryujinx.Memory/MemoryBlock.cs b/Ryujinx.Memory/MemoryBlock.cs index 82a7d882..c6b85b58 100644 --- a/Ryujinx.Memory/MemoryBlock.cs +++ b/Ryujinx.Memory/MemoryBlock.cs @@ -48,7 +48,7 @@ namespace Ryujinx.Memory { _viewCompatible = flags.HasFlag(MemoryAllocationFlags.ViewCompatible); _forceWindows4KBView = flags.HasFlag(MemoryAllocationFlags.ForceWindows4KBViewMapping); - _pointer = MemoryManagement.Reserve(size, _viewCompatible); + _pointer = MemoryManagement.Reserve(size, _viewCompatible, _forceWindows4KBView); } else { @@ -404,7 +404,7 @@ namespace Ryujinx.Memory } else { - MemoryManagement.Free(ptr); + MemoryManagement.Free(ptr, Size, _forceWindows4KBView); } foreach (MemoryBlock viewStorage in _viewStorages.Keys) -- cgit v1.2.3