Example #1
0
        public AMemory(IntPtr Ram, AMemoryAlloc Allocator)
        {
            Manager = new AMemoryMgr(Allocator);

            Monitors = new Dictionary <int, ExMonitor>();

            ExAddrs = new HashSet <long>();

            RamPtr = (byte *)Ram;
        }
Example #2
0
        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;
        }
Example #3
0
        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;
        }