*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->FreeBSD man pages -> mincore (2)              



NAME    [Toc]    [Back]

     mincore -- determine residency of memory pages

LIBRARY    [Toc]    [Back]

     Standard C Library (libc, -lc)

SYNOPSIS    [Toc]    [Back]

     #include <sys/mman.h>

     mincore(const void *addr, size_t len, char *vec);

DESCRIPTION    [Toc]    [Back]

     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>):

     MINCORE_INCORE	       Page is in core (resident).

     MINCORE_REFERENCED        Page has been referenced by us.

     MINCORE_MODIFIED	       Page has been modified by us.

     MINCORE_REFERENCED_OTHER  Page has been referenced.

     MINCORE_MODIFIED_OTHER    Page has been modified.

     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.

RETURN VALUES    [Toc]    [Back]

     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

ERRORS    [Toc]    [Back]

     The mincore() system call will fail if:

     [EINVAL]		The virtual address range specified by the addr and
			len arguments is not valid.

     [EFAULT]		The vec argument points to an illegal address.

SEE ALSO    [Toc]    [Back]

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

HISTORY    [Toc]    [Back]

     The mincore() system call first appeared in 4.4BSD.

FreeBSD 5.2.1		       January 17, 2003 		 FreeBSD 5.2.1
[ Back ]
 Similar pages
Name OS Title
manpath FreeBSD determine user's search path for man pages
manpath Linux determine search path for manual pages
mmap IRIX map pages of memory
mmap HP-UX map pages of memory
mpin IRIX lock pages in memory
munmap IRIX unmap pages of memory
munmap HP-UX unmap pages of memory
pmap_copy_page FreeBSD copy physical memory pages
mlock IRIX lock or unlock pages in memory
pmap_copy FreeBSD copy physical memory pages
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service