#include <sys/mman.h> int
mincore (const void *addr size_t len char *vec);
system call determines whether each of the pages in the region beginning at
and continuing for
bytes is resident.
The status is returned in the
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
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.
The information returned by
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
Rv -std mincore
system call will fail if:
Bq Er ENOMEM
The virtual address range specified by the
arguments is not fully mapped.