Initiates page-out for a page range in the address space.
#include <sys/types.h> #include <sys/errno.h> #include <sys/vmuser.h>
int vm_write (vaddr, nbytes, force) int vaddr; int nbytes; int force;
The vm_write kernel service initiates page-out for pages that intersect the address range (vaddr, vaddr + nbytes).
If the force parameter is nonzero, modified pages are written to disk regardless of how recently they have been written.
Page-out is initiated for each modified page. An unchanged page is left in memory with its reference bit set to 0. This makes the unchanged page a candidate for the page replacement algorithm.
The caller must have write access to the specified pages.
The initiated I/O is asynchronous. The vms_iowait kernel service can be called to wait for I/O completion.
The vm_write kernel service can be called from the process environment only.
0 | Indicates a successful completion. |
EINVAL | Indicates one of these four errors: |
EACCES | Indicates that access does not permit writing. |
EIO | Indicates a permanent I/O error. |
The vm_write kernel service is part of Base Operating System (BOS) Runtime.
The vm_writep kernel service, vms_iowait kernel service.
Memory Kernel Services and Understanding Virtual Memory Manager Interfaces in AIX Kernel Extensions and Device Support Programming Concepts.