MemoryFreeType Enumeration

Specifies the type of a memory free operation.

Definition

Namespace: DevCase.Win32.Enums
Assembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
public enum MemoryFreeType

Remarks

Members

Decommit 16,384 Decommits the specified region of committed pages.

After the operation, the pages are in the reserved state.

The function does not fail if you attempt to decommit an uncommitted page. This means that you can decommit a range of pages without first determining the current commitment state.

When using the VirtualAlloc(IntPtr, IntPtr, MemoryAllocationType, MemoryProtectionOptions) fucntion, the Decommit value is not supported when the address parameter provides the base address for an enclave.

Release 32,768 Releases the specified region of pages.

After this operation, the pages are in the free state.

When using the VirtualAlloc(IntPtr, IntPtr, MemoryAllocationType, MemoryProtectionOptions) fucntion, if you specify this value, size parameter must be Zero, and address parameter must point to the base address returned by the VirtualAlloc(IntPtr, IntPtr, MemoryAllocationType, MemoryProtectionOptions) fucntion when the region is reserved. The function fails if either of these conditions is not met.

If any pages in the region are committed currently, the function first decommits, and then releases them.

The function does not fail if you attempt to release pages that are in different states, some reserved and some committed. This means that you can release a range of pages without first determining the current commitment state.

See Also