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

  man pages->NetBSD man pages -> madvise (2)              



NAME    [Toc]    [Back]

     madvise - give advice about use of memory

LIBRARY    [Toc]    [Back]

     Standard C Library (libc, -lc)

SYNOPSIS    [Toc]    [Back]

     #include <sys/mman.h>

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

DESCRIPTION    [Toc]    [Back]

     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       /* ensure that resources are reserved */
     #define MADV_FREE       6       /* pages are empty, free them */

SEE ALSO    [Toc]    [Back]

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

HISTORY    [Toc]    [Back]

     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.

BSD                              June 9, 1993                              BSD
[ Back ]
 Similar pages
Name OS Title
madvise IRIX give advice about handling memory
vm_map_madvise FreeBSD apply advice about use of memory to map entries
head HP-UX give first few lines
head IRIX give first few lines
addprivuser IRIX give a user all system administration privileges
krb5-config FreeBSD give information on how to link code against Heimdal libraries
mmap FreeBSD allocate memory, or map files or devices into memory
mem OpenBSD memory files and memory controller
kmem OpenBSD memory files and memory controller
shm_open FreeBSD open or create a shared memory object shm_unlink -- remove a shared memory object
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service