Remove freed memory range from tree on memory block disposal (#3347)
* Remove freed memory range from tree on memory block disposal * PR feedback
This commit is contained in:
parent
633c5ec330
commit
dd8f97ab9e
4 changed files with 76 additions and 21 deletions
|
@ -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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue