Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Contact Us
Online Help
Domain Status
Man Pages

Virtual Servers

Topology Map

Server Agreement
Year 2038

USA Flag



Man Pages
MINCORE(2) FreeBSD System Calls Manual MINCORE(2)

determine residency of memory pages

Standard C Library (libc, -lc)

#include <sys/mman.h>
mincore(const void *addr, size_t len, char *vec);

The mincore() system call determines whether each of the pages in the region beginning at addr and continuing for len bytes is resident. 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 <sys/mman.h>):
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.
The information returned by mincore() may be out of date by the time the system call returns. The only way to ensure that a page is resident is to lock it into memory with the mlock(2) system call.

The mincore() function returns the value 0 if successful; otherwise the value -1 is returned and the global variable errno is set to indicate the error.

The mincore() system call will fail if:
The virtual address range specified by the addr and len arguments is not fully mapped.
The vec argument points to an illegal address.

madvise(2), mlock(2), mprotect(2), msync(2), munmap(2), getpagesize(3)

The mincore() system call first appeared in 4.4BSD.
June 1, 2018 FreeBSD 12.0-RELEASE

Search for    or go to Top of page |  Section 2 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.