Exemplo n.º 1
0
        public static void Setup()
        {
            NormalAllocator = CreateAllocatorStage1();
            NormalAllocator = CreateAllocatorStage2();

            var allocator2 = new VirtualInitialPageAllocator(false)
            {
                DebugName = "VirtIdentityInitial"
            };

            allocator2.Setup(new MemoryRegion(Address.IdentityMapStart, 60 * 1024 * 1024), AddressSpaceKind.Virtual);
            IdentityAllocator = allocator2;

            var allocator3 = new VirtualInitialPageAllocator(false)
            {
                DebugName = "GlobalInitial"
            };

            allocator3.Setup(new MemoryRegion(600 * 1024 * 1024, 100 * 1024 * 1024), AddressSpaceKind.Virtual);
            GlobalAllocator = allocator3;

            PhysicalPageManager.SelfTest();
            SelfTest(NormalAllocator);
            SelfTest(IdentityAllocator);
        }
Exemplo n.º 2
0
        //private static Addr _startVirtAddr;
        //private static Addr _nextVirtAddr;

        //private static Addr _identityStartVirtAddr;
        //private static Addr _identityNextVirtAddr;

        public static void Setup()
        {
            //_startVirtAddr = Address.VirtMapStart;
            //_nextVirtAddr = _startVirtAddr;

            //lockObj = new object();
            //LockCount = 0;

            NormalAllocator = CreateAllocatorStage1();
            NormalAllocator = CreateAllocatorStage2();

            //_identityStartVirtAddr = Address.IdentityMapStart;
            //_identityNextVirtAddr = _identityStartVirtAddr;

            var allocator2 = new VirtualInitialPageAllocator(false)
            {
                DebugName = "VirtIdentityInitial"
            };

            allocator2.Setup(new MemoryRegion(Address.IdentityMapStart, 60 * 1024 * 1024), AddressSpaceKind.Virtual);
            IdentityAllocator = allocator2;

            var allocator3 = new VirtualInitialPageAllocator(false)
            {
                DebugName = "GlobalInitial"
            };

            allocator3.Setup(new MemoryRegion(600 * 1024 * 1024, 100 * 1024 * 1024), AddressSpaceKind.Virtual);
            GlobalAllocator = allocator3;

            PhysicalPageManager.SelfTest();
            SelfTest(NormalAllocator);
            SelfTest(IdentityAllocator);
        }