Kernel32OfferVirtualMemory(IntPtr, IntPtr, OfferVirtualMemoryPriority) Method
Indicates that the data contained in a range of memory pages is no longer needed by the application and
can be discarded by the system if necessary.
The specified pages will be marked as inaccessible, removed from the process working set,
and will not be written to the paging file.
To later reclaim offered pages, call
ReclaimVirtualMemory(IntPtr, IntPtr) function.
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)>]
static member OfferVirtualMemory :
address : IntPtr *
size : IntPtr *
priority : OfferVirtualMemoryPriority -> Win32ErrorCode
No code example is currently available or this language may not be supported.
- address IntPtr
-
Page-aligned starting address of the memory to offer.
- size IntPtr
-
Size, in bytes, of the memory region to offer.
size must be an integer multiple of the system page size.
- priority OfferVirtualMemoryPriority
-
Indicates how important the offered memory is to the application.
A higher priority increases the probability that the offered memory can be reclaimed intact
when calling ReclaimVirtualMemory(IntPtr, IntPtr) function.
The system typically discards lower priority memory before discarding higher priority memory.
Win32ErrorCode
Returns
ERROR_SUCCESS if successful.
Returns a System Error Code (
Win32ErrorCode) otherwise.