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

vm_writep Kernel Service


Initiates page-out for a page range in a virtual memory object.


#include <sys/types.h>
#include <sys/errno.h>
#include <sys/vmuser.h>
int vm_writep (vmid, pfirst, npages)
vmid_t  vmid; 
int pfirst; 
int npages; 


vmid Specifies the identifier for the virtual memory object.
pfirst Specifies the first page number at which page-out is to begin.
npages Specifies the number of pages for which the page-out operation is to be performed.


The vm_writep kernel service initiates page-out for the specified page range in the virtual memory object. I/O is initiated for modified pages only. Unchanged pages are left in memory, but their reference bits are set to 0.

The caller can wait for the completion of I/O initiated by this and prior calls by calling the vms_iowait kernel service.

Execution Environment

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

Return Values

0 Indicates successful completion.
EINVAL Indicates any one of the following errors:
  • The virtual memory object ID is not valid.
  • The starting page is negative.
  • The number of pages is negative.
  • The page range exceeds the size of virtual memory object.

Implementation Specifics

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

Related Information

The vm_write kernel service, vms_iowait 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 ]