1
0
Fork 0
mirror of https://github.com/Ryujinx/Ryujinx.git synced 2024-11-18 13:36:39 +00:00
Ryujinx/Ryujinx.Memory.Tests/MockVirtualMemoryManager.cs
gdkchan 3c60d4b0ea
Do not report unmapped pages as dirty (#1672)
* Do not report unmapped pages as dirty

* Make tests pass again

* PR feedback
2020-11-10 22:07:52 -03:00

28 lines
711 B
C#

using Ryujinx.Memory.Tracking;
namespace Ryujinx.Memory.Tests
{
class MockVirtualMemoryManager : IVirtualMemoryManager
{
public bool NoMappings;
public MockVirtualMemoryManager(ulong size, int pageSize)
{
}
public (ulong address, ulong size)[] GetPhysicalRegions(ulong va, ulong size)
{
return NoMappings ? new (ulong address, ulong size)[0] : new (ulong address, ulong size)[] { (va, size) };
}
public bool IsRangeMapped(ulong va, ulong size)
{
return true;
}
public void TrackingReprotect(ulong va, ulong size, MemoryPermission protection)
{
}
}
}