Skip site navigation (1)Skip section navigation (2)

FreeBSD Man Pages

Man Page or Keyword Search:
Man Architecture
Apropos Keyword Search (all sections) Output format
home | help
MADVISE(2)                FreeBSD System Calls Manual               MADVISE(2)

NAME
     madvise - give advice about use of memory

LIBRARY
     Standard C Library (libc, -lc)

SYNOPSIS
     #include <sys/types.h>
     #include <sys/mman.h>

     int
     madvise(void *addr, size_t len, int behav);

DESCRIPTION
     The madvise() system call allows a process that has knowledge of its
     memory behavior to describe it to the system.  The known behaviors are
     given in _sys/mman.h_:

     #define MADV_NORMAL     0       /* no further special treatment */
     #define MADV_RANDOM     1       /* expect random page references */
     #define MADV_SEQUENTIAL 2       /* expect sequential references */
     #define MADV_WILLNEED   3       /* will need these pages */
     #define MADV_DONTNEED   4       /* don't need these pages */
     #define MADV_SPACEAVAIL 5       /* insure that resources are reserved */
     #define MADV_FREE       6       /* pages are empty, free them */

SEE ALSO
     mincore(2), mprotect(2), msync(2), munmap(2)

HISTORY
     The madvise system call first appeared in 4.4BSD, but until NetBSD 1.5 it
     did not perform any of the requests on, or change any behavior of the
     address range given.

FreeBSD 11.0-PRERELEASE          June 9, 1993          FreeBSD 11.0-PRERELEASE

NAME | LIBRARY | SYNOPSIS | DESCRIPTION | SEE ALSO | HISTORY

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=madvise&sektion=2&manpath=NetBSD+1.5>

home | help