示例#1
0
        public static BootInfoMemory AllocateMemoryMap(USize size, BootInfoMemoryType type)
        {
            var map = new BootInfoMemory();

            map.Start      = PageStartAddr;
            map.Size       = size;
            map.Type       = type;
            PageStartAddr += size;

            KernelMessage.WriteLine("Allocated MemoryMap of Type {0} at {1:X8} with Size {2:X8}", (uint)type, map.Start, map.Size);

            return(map);
        }
示例#2
0
 static bool AddressInMap(Addr addr, BootInfoMemory map)
 {
     return(map.Start <= addr && addr < map.Start + map.Size);
 }