Exemplo n.º 1
0
        /// <summary>
        /// Increases the virtual address data space
        /// </summary>
        /// <param name="size">The size to increase with</param>
        /// <returns>The old end</returns>
        public unsafe void *Sbrk(int size)
        {
            VirtualAddressRange range = new VirtualAddressRange(size);

            m_virtualAddresses.Add(range);
            return(range.Address);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Cleans up the context
        /// </summary>
        public void Cleanup()
        {
            int count = m_virtualAddresses.Count;

            for (int i = 0; i < count; i++)
            {
                VirtualAddressRange range = (VirtualAddressRange)m_virtualAddresses.Item[i];
                range.Dispose();
            }

            m_virtualAddresses.Dispose();
            Heap.Free(m_virtualAddresses);

            Paging.FreeDirectory(PageDirVirtual);
        }