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

  man pages->NetBSD man pages -> mincore (2)              
Title
Content
Arch
Section
 

MINCORE(2)

Contents


NAME    [Toc]    [Back]

     mincore - determine residency of memory pages

LIBRARY    [Toc]    [Back]

     Standard C Library (libc, -lc)

SYNOPSIS    [Toc]    [Back]

     #include <sys/mman.h>

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

DESCRIPTION    [Toc]    [Back]

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

RETURN VALUES    [Toc]    [Back]

     mincore() returns 0 on success, or -1 on failure and sets the variable
     errno to indicate the error.

ERRORS    [Toc]    [Back]

     The mincore() call will fail if:

     [EFAULT]           vec points to an illegal address.

     [EINVAL]           addr is not a multiple of the system page size.

     [EINVAL]           len is equal to 0.

     [ENOMEM]           The address range specified is invalid for the calling
                        process, or one or more of the pages specified in the
                        range are not mapped.

SEE ALSO    [Toc]    [Back]

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

HISTORY    [Toc]    [Back]

     The mincore() function first appeared in 4.4BSD.

BSD                              June 6, 1999                              BSD
[ 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