[ Previous | Next | Contents | Home | Search ]
AIX Version 4.3 Kernel and Subsystems Technical Reference, Volume 1

vm_releasep Kernel Service


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 (pfirstpfirst 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.

Execution Environment

The vm_releasep kernel service can be called from the process environment only.

Return Values

0 Indicates a successful operation.
EINVAL Indicates one of the following errors:
  • An invalid virtual memory object ID.
  • The starting page is negative.
  • Number of pages is negative.
  • Page range crosses a virtual memory object boundary.

Implementation Specifics

The vm_releasep kernel service is part of Base Operating System (BOS) Runtime.

Related Information

The vm_release kernel service.

Memory Kernel Services and Understanding Virtual Memory Manager Interfaces in AIX Kernel Extensions and Device Support Programming Concepts.

[ Previous | Next | Contents | Home | Search ]