public AMemory(IntPtr Ram, AMemoryAlloc Allocator) { Manager = new AMemoryMgr(Allocator); Monitors = new Dictionary <int, ExMonitor>(); ExAddrs = new HashSet <long>(); RamPtr = (byte *)Ram; }
public AMemory() { Manager = new AMemoryMgr(); Monitors = new Dictionary <int, ExMonitor>(); ExAddrs = new HashSet <long>(); Ram = Marshal.AllocHGlobal((IntPtr)AMemoryMgr.RamSize + AMemoryMgr.PageSize); RamPtr = (byte *)Ram; }
public AMemory() { Manager = new AMemoryMgr(); Monitors = new Dictionary <int, ArmMonitor>(); if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) { Ram = AMemoryWin32.Allocate((IntPtr)AMemoryMgr.RamSize + AMemoryMgr.PageSize); } else { Ram = Marshal.AllocHGlobal((IntPtr)AMemoryMgr.RamSize + AMemoryMgr.PageSize); } RamPtr = (byte *)Ram; }