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

  man pages->IRIX man pages -> standard/madvise (2)              


MADVISE(2)							    MADVISE(2)

NAME    [Toc]    [Back]

     madvise - give advice about handling memory

SYNOPSIS    [Toc]    [Back]

     #include <sys/mman.h>

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

DESCRIPTION    [Toc]    [Back]

     madvise provides the system advice	about the process' expected use	of its
     address space from	addr to	addr + len.

     The following types of behavior are currently recognized by the system:

     MADV_DONTNEED    informs the system that the address range	from addr to
		      addr + len will likely not be referenced in the near
		      future.  The memory to which the indicated addresses are
		      mapped will be the first to be reclaimed when memory is
		      needed by	the system.

     madvise will fail if:

     [ENOMEM]	    Addresses in the range (addr, addr + len) are outside the
		    valid range	for the	address	space of the process.

     [EINVAL]	    behavior is	not recognized by the system.

SEE ALSO    [Toc]    [Back]

     mmap(2), msync(2).

DIAGNOSTICS    [Toc]    [Back]

     A 0 value is returned on success; a -1 value indicates an error.

BUGS    [Toc]    [Back]

     MADV_DONTNEED advice is currently only heeded for memory mapped via
     explicit mmap(2) system calls.

									PPPPaaaaggggeeee 1111
[ Back ]
 Similar pages
Name OS Title
madvise NetBSD give advice about use of memory
posix_madvise FreeBSD give advice about use of memory
madvise Linux give advice about use of memory
madvise FreeBSD give advice about use of memory
madvise OpenBSD give advice about use of memory
vm_map_madvise FreeBSD apply advice about use of memory to map entries
head IRIX give first few lines
head HP-UX 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
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service