Пример #1
0
        /// <summary>
        /// Allocates the memory.
        /// </summary>
        /// <param name="size">The size.</param>
        /// <param name="alignment">The alignment.</param>
        /// <returns></returns>
        public override Memory AllocateMemory(uint size, uint alignment)
        {
            var address = KernelMemory.AllocateMemory(size);

            return(new Memory(address, size));
        }
Пример #2
0
 public static void SetInitialMemory()
 {
     KernelMemory.SetInitialMemory(Address.GCInitialMemory, 0x01000000);
 }
Пример #3
0
        /// <summary>
        /// Allocates the virtual memory.
        /// </summary>
        /// <param name="size">The size.</param>
        /// <param name="alignment">The alignment.</param>
        /// <returns></returns>
        public override ConstrainedPointer AllocateVirtualMemory(uint size, uint alignment)
        {
            var address = KernelMemory.AllocateVirtualMemory(size);

            return(new ConstrainedPointer(address, size));
        }
Пример #4
0
        /// <summary>
        /// Allocates the memory.
        /// </summary>
        /// <param name="size">The size.</param>
        /// <param name="alignment">The alignment.</param>
        /// <returns></returns>
        IMemory IHardwareAbstraction.AllocateMemory(uint size, uint alignment)
        {
            uint address = KernelMemory.AllocateMemory(size);

            return(new Memory(address, size));
        }