From dd8f97ab9e77dde25c323feaff97cfc8f19207fa Mon Sep 17 00:00:00 2001 From: gdkchan Date: Sun, 5 Jun 2022 15:12:42 -0300 Subject: Remove freed memory range from tree on memory block disposal (#3347) * Remove freed memory range from tree on memory block disposal * PR feedback --- Ryujinx.Memory/MemoryManagementWindows.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'Ryujinx.Memory/MemoryManagementWindows.cs') diff --git a/Ryujinx.Memory/MemoryManagementWindows.cs b/Ryujinx.Memory/MemoryManagementWindows.cs index 3d51b64f..6b4e7fbe 100644 --- a/Ryujinx.Memory/MemoryManagementWindows.cs +++ b/Ryujinx.Memory/MemoryManagementWindows.cs @@ -68,9 +68,9 @@ namespace Ryujinx.Memory return WindowsApi.VirtualFree(location, size, AllocationType.Decommit); } - public static void MapView(IntPtr sharedMemory, ulong srcOffset, IntPtr location, IntPtr size) + public static void MapView(IntPtr sharedMemory, ulong srcOffset, IntPtr location, IntPtr size, MemoryBlock owner) { - _placeholders.MapView(sharedMemory, srcOffset, location, size); + _placeholders.MapView(sharedMemory, srcOffset, location, size, owner); } public static void MapView4KB(IntPtr sharedMemory, ulong srcOffset, IntPtr location, IntPtr size) @@ -106,9 +106,9 @@ namespace Ryujinx.Memory } } - public static void UnmapView(IntPtr sharedMemory, IntPtr location, IntPtr size) + public static void UnmapView(IntPtr sharedMemory, IntPtr location, IntPtr size, MemoryBlock owner) { - _placeholders.UnmapView(sharedMemory, location, size); + _placeholders.UnmapView(sharedMemory, location, size, owner); } public static void UnmapView4KB(IntPtr location, IntPtr size) @@ -154,7 +154,7 @@ namespace Ryujinx.Memory } else { - _placeholders.UnmapView(IntPtr.Zero, address, size); + _placeholders.UnreserveRange((ulong)address, (ulong)size); } return WindowsApi.VirtualFree(address, IntPtr.Zero, AllocationType.Release); -- cgit v1.2.3