aboutsummaryrefslogtreecommitdiff
path: root/ChocolArm64/Memory
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2018-07-29 01:39:15 -0300
committergdkchan <gab.dark.100@gmail.com>2018-07-29 01:39:15 -0300
commit3208173620a0003d09d8e756729ca905ff14c47f (patch)
treed10f5b62f97b50545721bc82e8cf6c0f89fc058a /ChocolArm64/Memory
parentfdda67d4762c6a283ff0f1f76c02a02b21d9b119 (diff)
Cache changes (#302)
* Skip repeated cache tests between same sync * Skip some checks for regions where just one resource is resident * Dehardcode residency page size * Some cleanup
Diffstat (limited to 'ChocolArm64/Memory')
-rw-r--r--ChocolArm64/Memory/AMemory.cs10
1 files changed, 5 insertions, 5 deletions
diff --git a/ChocolArm64/Memory/AMemory.cs b/ChocolArm64/Memory/AMemory.cs
index 054277b2..e969cca5 100644
--- a/ChocolArm64/Memory/AMemory.cs
+++ b/ChocolArm64/Memory/AMemory.cs
@@ -160,23 +160,23 @@ namespace ChocolArm64.Memory
return HostPageSize;
}
- public bool[] IsRegionModified(long Position, long Size)
+ public (bool[], long) IsRegionModified(long Position, long Size)
{
if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
- return null;
+ return (null, 0);
}
long EndPos = Position + Size;
if ((ulong)EndPos < (ulong)Position)
{
- return null;
+ return (null, 0);
}
if ((ulong)EndPos > AMemoryMgr.RamSize)
{
- return null;
+ return (null, 0);
}
IntPtr MemAddress = new IntPtr(RamPtr + Position);
@@ -201,7 +201,7 @@ namespace ChocolArm64.Memory
Modified[(VA - Position) / HostPageSize] = true;
}
- return Modified;
+ return (Modified, Count);
}
public IntPtr GetHostAddress(long Position, long Size)