Beispiel #1
0
        /// <inheritdoc/>
        public void Unmap(ulong va, ulong size)
        {
            AssertValidAddressAndSize(va, size);

            UnmapEvent?.Invoke(va, size);
            Tracking.Unmap(va, size);

            RemoveMapping(va, size);
            _addressSpace.Decommit(va, size);
        }
Beispiel #2
0
        /// <inheritdoc/>
        public void Unmap(ulong va, ulong size)
        {
            AssertValidAddressAndSize(va, size);

            UnmapEvent?.Invoke(va, size);
            Tracking.Unmap(va, size);

            RemoveMapping(va, size);
            PtUnmap(va, size);
            _addressSpace.UnmapView(_backingMemory, va, size);
            _addressSpaceMirror.UnmapView(_backingMemory, va, size);
        }
Beispiel #3
0
        /// <summary>
        /// Unmaps a previously mapped range of virtual memory.
        /// </summary>
        /// <param name="va">Virtual address of the range to be unmapped</param>
        /// <param name="size">Size of the range to be unmapped</param>
        public void Unmap(ulong va, ulong size)
        {
            // If size is 0, there's nothing to unmap, just exit early.
            if (size == 0)
            {
                return;
            }

            UnmapEvent?.Invoke(va, size);

            ulong remainingSize = size;
            ulong oVa           = va;

            while (remainingSize != 0)
            {
                _pageTable.Write((va / PageSize) * PteSize, 0UL);

                va            += PageSize;
                remainingSize -= PageSize;
            }
            Tracking.Unmap(oVa, size);
        }
Beispiel #4
0
        /// <inheritdoc/>
        public void Unmap(ulong va, ulong size)
        {
            // If size is 0, there's nothing to unmap, just exit early.
            if (size == 0)
            {
                return;
            }

            AssertValidAddressAndSize(va, size);

            UnmapEvent?.Invoke(va, size);
            Tracking.Unmap(va, size);

            ulong remainingSize = size;

            while (remainingSize != 0)
            {
                _pageTable.Write((va / PageSize) * PteSize, (nuint)0);

                va            += PageSize;
                remainingSize -= PageSize;
            }
        }