diff options
author | gdkchan <gab.dark.100@gmail.com> | 2022-06-05 15:12:42 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-05 15:12:42 -0300 |
commit | dd8f97ab9e77dde25c323feaff97cfc8f19207fa (patch) | |
tree | 8698828d00b13d1952e4aa08df4386ee7d248908 /Ryujinx.Memory/MemoryBlock.cs | |
parent | 633c5ec3306e474dab15617c5f93b94546bd9e09 (diff) |
Remove freed memory range from tree on memory block disposal (#3347)1.1.141
* Remove freed memory range from tree on memory block disposal
* PR feedback
Diffstat (limited to 'Ryujinx.Memory/MemoryBlock.cs')
-rw-r--r-- | Ryujinx.Memory/MemoryBlock.cs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Ryujinx.Memory/MemoryBlock.cs b/Ryujinx.Memory/MemoryBlock.cs index c6b85b58..b68a1000 100644 --- a/Ryujinx.Memory/MemoryBlock.cs +++ b/Ryujinx.Memory/MemoryBlock.cs @@ -19,6 +19,8 @@ namespace Ryujinx.Memory private ConcurrentDictionary<MemoryBlock, byte> _viewStorages; private int _viewCount; + internal bool ForceWindows4KBView => _forceWindows4KBView; + /// <summary> /// Pointer to the memory block data. /// </summary> @@ -145,7 +147,7 @@ namespace Ryujinx.Memory srcBlock.IncrementViewCount(); } - MemoryManagement.MapView(srcBlock._sharedMemory, srcOffset, GetPointerInternal(dstOffset, size), size, _forceWindows4KBView); + MemoryManagement.MapView(srcBlock._sharedMemory, srcOffset, GetPointerInternal(dstOffset, size), size, this); } /// <summary> @@ -156,7 +158,7 @@ namespace Ryujinx.Memory /// <param name="size">Size of the range to be unmapped</param> public void UnmapView(MemoryBlock srcBlock, ulong offset, ulong size) { - MemoryManagement.UnmapView(srcBlock._sharedMemory, GetPointerInternal(offset, size), size, _forceWindows4KBView); + MemoryManagement.UnmapView(srcBlock._sharedMemory, GetPointerInternal(offset, size), size, this); } /// <summary> |