Kernel32ReclaimVirtualMemory(IntPtr, UInt32) Method
Reclaims a range of memory pages that were offered to the system with
OfferVirtualMemory(IntPtr, IntPtr, OfferVirtualMemoryPriority) function.
If the offered memory has been discarded,
the contents of the memory region is undefined and must be rewritten by the application.
If the offered memory has not been discarded, it is reclaimed intact.
Namespace: DevCase.Win32.NativeMethodsAssembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[DllImportAttribute("Kernel32.dll", ExactSpelling = true, SetLastError = true)]
public static Win32ErrorCode ReclaimVirtualMemory(
IntPtr address,
uint size
)
<DllImportAttribute("Kernel32.dll", ExactSpelling := true, SetLastError := true>]
Public Shared Function ReclaimVirtualMemory (
address As IntPtr,
size As UInteger
) As Win32ErrorCode
Dim address As IntPtr
Dim size As UInteger
Dim returnValue As Win32ErrorCode
returnValue = Kernel32.ReclaimVirtualMemory(address,
size)
public:
[DllImportAttribute(L"Kernel32.dll", ExactSpelling = true, SetLastError = true)]
static Win32ErrorCode ReclaimVirtualMemory(
IntPtr address,
unsigned int size
)
[<DllImportAttribute("Kernel32.dll", ExactSpelling = true, SetLastError = true)>]
static member ReclaimVirtualMemory :
address : IntPtr *
size : uint32 -> Win32ErrorCode
No code example is currently available or this language may not be supported.
- address IntPtr
-
Page-aligned starting address of the memory to reclaim.
- size UInt32
-
Size, in bytes, of the memory region to reclaim.
size must be an integer multiple of the system page size.
Win32ErrorCode
Returns
ERROR_SUCCESS if successful and the memory was reclaimed intact.
Returns
ERROR_BUSY if successful but the memory was discarded and must be rewritten by the application.
In this case, the contents of the memory region is undefined.
Returns a System Error Code (
Win32ErrorCode) otherwise.