Releases virtual memory resources for the specified page range.
#include <sys/types.h> #include <sys/errno.h> #include <sys/vmuser.h>
int vm_releasep (vmid, pfirst, npages) vmid_t vmid; int pfirst; int npages;
vmid | Specifies the virtual memory object identifier. |
pfirst | Specifies the first page number in the specified page range. |
npages | Specifies the number of pages in the specified page range. |
The vm_releasep kernel service releases pages for the specified page range in the virtual memory object. The values in the pfirst and npages parameters must be nonnegative.
Each page of the virtual memory object that intersects the page range (pfirst, pfirst + npages -1) is logically reset to 0, and any page frame is discarded. A page frame in the I/O state is marked for discard at I/O completion.
For working storage, paging-space disk blocks are freed and the storage-protect key is reset to the default value.
Note: All of the pages to be released must be in the same virtual memory object.
The vm_releasep kernel service can be called from the process environment only.
0 | Indicates a successful operation. |
EINVAL | Indicates one of the following errors: |
The vm_releasep kernel service is part of Base Operating System (BOS) Runtime.
The vm_release kernel service.
Memory Kernel Services and Understanding Virtual Memory Manager Interfaces in AIX Kernel Extensions and Device Support Programming Concepts.