Manual browser: mincore(2)
|MINCORE(2)||System Calls Manual||MINCORE(2)|
NAMEmincore — determine residency of memory pages
LIBRARYStandard C Library (libc, -lc)
mincore(void *addr, size_t len, char *vec);
DESCRIPTIONThe mincore() system call allows a process to obtain information about whether pages are core resident. The status of the memory range is returned in the character-per-page array vec. If the page is resident, the least significant bit of the corresponding character in vec will be set. Other bits are reserved for additional information which future implementations may return.
Note that the status of each page may change between the call to mincore() and the return of the page status information. In order to guarantee that pages will remain in core, the address range must be locked with mlock(2).
RETURN VALUESmincore() returns 0 on success, or -1 on failure and sets the variable errno to indicate the error.
ERRORSThe mincore() call will fail if:
- vec points to an illegal address.
- addr is not a multiple of the system page size.
- len is equal to 0.
- The address range specified is invalid for the calling process, or one or more of the pages specified in the range are not mapped.
HISTORYThe mincore() function first appeared in 4.4BSD.
|June 6, 1999||NetBSD 7.0|