using Ryujinx.Cpu.Tracking; using Ryujinx.Memory; using Ryujinx.Memory.Tracking; using System; using System.Collections.Generic; namespace Ryujinx.Cpu { public interface IVirtualMemoryManagerTracked : IVirtualMemoryManager { /// /// Reads data from CPU mapped memory, with read tracking /// /// Type of the data being read /// Virtual address of the data in memory /// The data T ReadTracked(ulong va) where T : unmanaged; /// /// Writes data to CPU mapped memory, without write tracking. /// /// Virtual address to write the data into /// Data to be written void WriteUntracked(ulong va, ReadOnlySpan data); /// /// Obtains a memory tracking handle for the given virtual region. This should be disposed when finished with. /// /// CPU virtual address of the region /// Size of the region /// Handle ID /// The memory tracking handle CpuRegionHandle BeginTracking(ulong address, ulong size, int id); /// /// Obtains a memory tracking handle for the given virtual region, with a specified granularity. This should be disposed when finished with. /// /// CPU virtual address of the region /// Size of the region /// Handles to inherit state from or reuse. When none are present, provide null /// Desired granularity of write tracking /// Handle ID /// The memory tracking handle CpuMultiRegionHandle BeginGranularTracking(ulong address, ulong size, IEnumerable handles, ulong granularity, int id); /// /// Obtains a smart memory tracking handle for the given virtual region, with a specified granularity. This should be disposed when finished with. /// /// CPU virtual address of the region /// Size of the region /// Desired granularity of write tracking /// Handle ID /// The memory tracking handle CpuSmartMultiRegionHandle BeginSmartGranularTracking(ulong address, ulong size, ulong granularity, int id); } }