The
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).