CSPspEmu.Hle.Loader.ElfLoader.AllocateMemory C# (CSharp) Метод

AllocateMemory() защищенный Метод

protected AllocateMemory ( ) : void
Результат void
        protected void AllocateMemory()
        {
            #if true
            uint Lowest = 0xFFFFFFFF;
            uint Highest = 0;
            foreach (var SectionHeader in SectionHeadersWithFlag(Elf.SectionHeader.FlagsSet.Allocate))
            {
                Lowest = Math.Min(Lowest, (uint)(BaseAddress + SectionHeader.Address));
                Highest = Math.Max(Highest, (uint)(BaseAddress + SectionHeader.Address + SectionHeader.Size));
            }
            foreach (var ProgramHeader in ProgramHeaders)
            {
                Lowest = Math.Min(Lowest, (uint)(BaseAddress + ProgramHeader.VirtualAddress));
                Highest = Math.Max(Highest, (uint)(BaseAddress + ProgramHeader.VirtualAddress + ProgramHeader.MemorySize));
            }

            MemoryPartition.AllocateLowHigh(Lowest, Highest, Name: "Elf");
            #else
            foreach (var SectionHeader in SectionHeadersWithFlag(Elf.SectionHeader.FlagsSet.Allocate))
            {
                MemoryPartition.AllocateLowSize(BaseAddress + SectionHeader.Address, SectionHeader.Size);
            }
            #endif
        }