GetMemoryMapLength() 공개 정적인 메소드

Gets the length of the memory map.
public static GetMemoryMapLength ( uint index ) : uint
index uint The index.
리턴 uint
예제 #1
0
        /// <summary>
        /// Setups the free memory.
        /// </summary>
        private static void SetupFreeMemory()
        {
            if (!Multiboot.IsMultibootAvailable)
            {
                return;
            }

            for (uint index = 0; index < Multiboot.MemoryMapCount; index++)
            {
                byte value = Multiboot.GetMemoryMapType(index);

                if (value == 1)
                {
                    uint start = Multiboot.GetMemoryMapBase(index);
                    uint size  = Multiboot.GetMemoryMapLength(index);

                    AddFreeMemory(start, size);
                }
            }
        }
예제 #2
0
        /// <summary>
        /// Setups the free memory.
        /// </summary>
        private static void SetupFreeMemory()
        {
            if (!Multiboot.IsMultibootEnabled)
            {
                return;
            }

            uint cnt = 0;

            for (uint index = 0; index < Multiboot.MemoryMapCount; index++)
            {
                byte value = Multiboot.GetMemoryMapType(index);

                ulong start = Multiboot.GetMemoryMapBase(index);
                ulong size  = Multiboot.GetMemoryMapLength(index);

                if (value == 1)
                {
                    AddFreeMemory(cnt++, (uint)start, (uint)size);
                }
            }
        }