|MINCORE(2)||System Calls Manual||MINCORE(2)|
determine residency of memory pages
Standard C Library (libc, -lc)
void *addr, size_t
system call determines whether each of the pages in the region beginning at
addr and continuing for len
bytes is resident or mapped, depending on the value of sysctl
vm.mincore_mapped. The status is returned in the
vec array, one character per page. Each character is
either 0 if the page is not resident, or a combination of the following
flags (defined in
- Page is in core (resident).
- Page has been referenced by us.
- Page has been modified by us.
- Page has been referenced.
- Page has been modified.
- Page is part of a large (“super”) page.
If the vm.mincore_mapped sysctl is set to a
non-zero value (default), only the current process' mappings of the pages in
the specified virtual address range are examined. This does not preclude the
system from returning
MINCORE_MODIFIED_OTHER statuses. Otherwise, if the
sysctl value is zero, all resident pages backing the specified address range
are examined, regardless of the mapping state.
mincore() function returns the
value 0 if successful; otherwise the value -1 is returned and
the global variable errno is set to indicate the
mincore() system call will fail
mincore() system call first appeared
|January 7, 2019||Debian|