Pins the specified address range in user or system memory.
#include <sys/types.h> #include <sys/errno.h> #include <sys/uio.h>
int xmempin(base, len, xd) caddr_t base; int len; struct xmem *xd;
base | Specifies the address of the first byte to pin. |
len | Indicates the number of bytes to pin. |
xd | Specifies the cross-memory descriptor. |
The xmempin 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.
The cross-memory descriptor must have been filled in correctly prior to the xmempin call (for example, by calling the xmattach kernel service). If the caller does not have a valid cross-memory descriptor, the pinu and unpinu kernel services must be used. The xmempin and xmemunpin kernel services have shorter pathlength than the pinu and unpinu kernel services.
The xmempin kernel service can be called from the process environment only.
The xmempin kernel service is part of Base Operating System (BOS) Runtime.
The pin kernel service, unpin kernel service, pinu kernel service, xmemunpin kernel service.
Understanding Execution Environments and Memory Kernel Services in AIX Kernel Extensions and Device Support Programming Concepts.