Pins the specified address range in user or system memory.
#include <sys/types.h> #include <sys/errno.h> #include <sys/uio.h>
int pinu ( base, len, segflg)
caddr_t base;
int len;
short segflg;
The pinu kernel service is used to pin pages backing a specified memory region which is defined in either system or user address space. Pinning a memory region prohibits the pager from stealing pages from the pages backing the pinned memory region. Once a memory region is pinned, accessing that region does not result in a page fault until the region is subsequently unpinned.
The pinu kernel service will not work on a mapped file.
If the caller has a valid cross-memory descriptor for the address range, the xmempin and xmemunpin kernel services can be used instead of pinu and unpinu, and result in less pathlength.
The pinu kernel service can be called from the process environment only.
0 | Indicates successful completion. |
EFAULT | Indicates that the memory region as specified by the base and len parameters is not within the address space specified by the segflg parameter. |
The pin kernel service, unpinu kernel service, xmempin kernel service, xmemunpin kernel service.
Understanding Execution Environments and Memory Kernel Services in AIX 5L Version 5.2 Kernel Extensions and Device Support Programming Concepts.