aboutsummaryrefslogtreecommitdiff
path: root/src/Ryujinx.Memory.Tests/MockVirtualMemoryManager.cs
diff options
context:
space:
mode:
authorTSR Berry <20988865+TSRBerry@users.noreply.github.com>2023-04-26 04:34:16 +0200
committerMary <thog@protonmail.com>2023-04-27 23:51:14 +0200
commit609abc8b9b3c05a63bef94c2133550b3c07f97b0 (patch)
tree2d1e27f0256c8f411ad55de9ccbb3d598f6c7237 /src/Ryujinx.Memory.Tests/MockVirtualMemoryManager.cs
parentcee712105850ac3385cd0091a923438167433f9f (diff)
Rename Ryujinx.Memory.Tests to Ryujinx.Tests.Memory
Diffstat (limited to 'src/Ryujinx.Memory.Tests/MockVirtualMemoryManager.cs')
-rw-r--r--src/Ryujinx.Memory.Tests/MockVirtualMemoryManager.cs109
1 files changed, 0 insertions, 109 deletions
diff --git a/src/Ryujinx.Memory.Tests/MockVirtualMemoryManager.cs b/src/Ryujinx.Memory.Tests/MockVirtualMemoryManager.cs
deleted file mode 100644
index ef81a461..00000000
--- a/src/Ryujinx.Memory.Tests/MockVirtualMemoryManager.cs
+++ /dev/null
@@ -1,109 +0,0 @@
-using Ryujinx.Memory.Range;
-using System;
-using System.Collections.Generic;
-
-namespace Ryujinx.Memory.Tests
-{
- public class MockVirtualMemoryManager : IVirtualMemoryManager
- {
- public bool Supports4KBPages => true;
-
- public bool NoMappings = false;
-
- public event Action<ulong, ulong, MemoryPermission> OnProtect;
-
- public MockVirtualMemoryManager(ulong size, int pageSize)
- {
- }
-
- public void Map(ulong va, ulong pa, ulong size, MemoryMapFlags flags)
- {
- throw new NotImplementedException();
- }
-
- public void MapForeign(ulong va, nuint hostAddress, ulong size)
- {
- throw new NotImplementedException();
- }
-
- public void Unmap(ulong va, ulong size)
- {
- throw new NotImplementedException();
- }
-
- public T Read<T>(ulong va) where T : unmanaged
- {
- throw new NotImplementedException();
- }
-
- public void Read(ulong va, Span<byte> data)
- {
- throw new NotImplementedException();
- }
-
- public void Write<T>(ulong va, T value) where T : unmanaged
- {
- throw new NotImplementedException();
- }
-
- public void Write(ulong va, ReadOnlySpan<byte> data)
- {
- throw new NotImplementedException();
- }
-
- public bool WriteWithRedundancyCheck(ulong va, ReadOnlySpan<byte> data)
- {
- throw new NotImplementedException();
- }
-
- public ReadOnlySpan<byte> GetSpan(ulong va, int size, bool tracked = false)
- {
- throw new NotImplementedException();
- }
-
- public WritableRegion GetWritableRegion(ulong va, int size, bool tracked = false)
- {
- throw new NotImplementedException();
- }
-
- public ref T GetRef<T>(ulong va) where T : unmanaged
- {
- throw new NotImplementedException();
- }
-
- IEnumerable<HostMemoryRange> IVirtualMemoryManager.GetHostRegions(ulong va, ulong size)
- {
- throw new NotImplementedException();
- }
-
- IEnumerable<MemoryRange> IVirtualMemoryManager.GetPhysicalRegions(ulong va, ulong size)
- {
- return NoMappings ? Array.Empty<MemoryRange>() : new MemoryRange[] { new MemoryRange(va, size) };
- }
-
- public bool IsMapped(ulong va)
- {
- return true;
- }
-
- public bool IsRangeMapped(ulong va, ulong size)
- {
- return true;
- }
-
- public ulong GetPhysicalAddress(ulong va)
- {
- throw new NotImplementedException();
- }
-
- public void SignalMemoryTracking(ulong va, ulong size, bool write, bool precise = false, int? exemptId = null)
- {
- throw new NotImplementedException();
- }
-
- public void TrackingReprotect(ulong va, ulong size, MemoryPermission protection)
- {
- OnProtect?.Invoke(va, size, protection);
- }
- }
-}