aboutsummaryrefslogtreecommitdiff
path: root/src/Ryujinx.Memory/Tracking/MultiRegionHandle.cs
diff options
context:
space:
mode:
authorriperiperi <rhy3756547@hotmail.com>2024-03-14 22:38:27 +0000
committerGitHub <noreply@github.com>2024-03-14 19:38:27 -0300
commitfdd3263e31f8bf352a21e05703d0a6a82c800995 (patch)
tree24859502db57a2febaa5ab4c7d968d7375156079 /src/Ryujinx.Memory/Tracking/MultiRegionHandle.cs
parentce607db944beb352065107830769d8570f0c245e (diff)
Separate guest/host tracking + unaligned protection (#6486)1.1.1229
* WIP: Separate guest/host tracking + unaligned protection Allow memory manager to define support for single byte guest tracking * Formatting * Improve docs * Properly handle cases where the address space bits are too low * Address feedback
Diffstat (limited to 'src/Ryujinx.Memory/Tracking/MultiRegionHandle.cs')
-rw-r--r--src/Ryujinx.Memory/Tracking/MultiRegionHandle.cs9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/Ryujinx.Memory/Tracking/MultiRegionHandle.cs b/src/Ryujinx.Memory/Tracking/MultiRegionHandle.cs
index 1c1b48b3..6fdca69f 100644
--- a/src/Ryujinx.Memory/Tracking/MultiRegionHandle.cs
+++ b/src/Ryujinx.Memory/Tracking/MultiRegionHandle.cs
@@ -37,7 +37,8 @@ namespace Ryujinx.Memory.Tracking
ulong size,
IEnumerable<IRegionHandle> handles,
ulong granularity,
- int id)
+ int id,
+ RegionFlags flags)
{
_handles = new RegionHandle[(size + granularity - 1) / granularity];
Granularity = granularity;
@@ -62,7 +63,7 @@ namespace Ryujinx.Memory.Tracking
// Fill any gap left before this handle.
while (i < startIndex)
{
- RegionHandle fillHandle = tracking.BeginTrackingBitmap(address + (ulong)i * granularity, granularity, _dirtyBitmap, i, id);
+ RegionHandle fillHandle = tracking.BeginTrackingBitmap(address + (ulong)i * granularity, granularity, _dirtyBitmap, i, id, flags);
fillHandle.Parent = this;
_handles[i++] = fillHandle;
}
@@ -83,7 +84,7 @@ namespace Ryujinx.Memory.Tracking
while (i < endIndex)
{
- RegionHandle splitHandle = tracking.BeginTrackingBitmap(address + (ulong)i * granularity, granularity, _dirtyBitmap, i, id);
+ RegionHandle splitHandle = tracking.BeginTrackingBitmap(address + (ulong)i * granularity, granularity, _dirtyBitmap, i, id, flags);
splitHandle.Parent = this;
splitHandle.Reprotect(handle.Dirty);
@@ -106,7 +107,7 @@ namespace Ryujinx.Memory.Tracking
// Fill any remaining space with new handles.
while (i < _handles.Length)
{
- RegionHandle handle = tracking.BeginTrackingBitmap(address + (ulong)i * granularity, granularity, _dirtyBitmap, i, id);
+ RegionHandle handle = tracking.BeginTrackingBitmap(address + (ulong)i * granularity, granularity, _dirtyBitmap, i, id, flags);
handle.Parent = this;
_handles[i++] = handle;
}