diff options
Diffstat (limited to 'src/Ryujinx.Memory/Tracking/RegionHandle.cs')
-rw-r--r-- | src/Ryujinx.Memory/Tracking/RegionHandle.cs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/Ryujinx.Memory/Tracking/RegionHandle.cs b/src/Ryujinx.Memory/Tracking/RegionHandle.cs index 7a59f9f2..63a16884 100644 --- a/src/Ryujinx.Memory/Tracking/RegionHandle.cs +++ b/src/Ryujinx.Memory/Tracking/RegionHandle.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.Linq; +using System.Reflection.Metadata; using System.Threading; namespace Ryujinx.Memory.Tracking @@ -444,6 +445,16 @@ namespace Ryujinx.Memory.Tracking } /// <summary> + /// Determines if this handle's memory range matches another exactly. + /// </summary> + /// <param name="other">The other handle</param> + /// <returns>True on a match, false otherwise</returns> + public bool RangeEquals(RegionHandle other) + { + return RealAddress == other.RealAddress && RealSize == other.RealSize; + } + + /// <summary> /// Dispose the handle. Within the tracking lock, this removes references from virtual regions. /// </summary> public void Dispose() |