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

  man pages->Tru64 Unix man pages -> madvise (2)              



NAME    [Toc]    [Back]

       madvise  - Advise the system of the expected paging behavior
 of a process

SYNOPSIS    [Toc]    [Back]

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

       int madvise(
               caddr_t addr,
               size_t len,
               int behav );

PARAMETERS    [Toc]    [Back]

       Specifies the address of the region to  which  the  advice
       refers.  Specifies the length in bytes of the region specified
 by the addr parameter.  Specifies  the  behavior  of
       the  region.  The following values for the behav parameter
       are defined in the <sys/mman.h> header  file:  No  further
       special  treatment  Expect  random  page references Expect
       sequential references Will need these pages  Do  not  need
       these pages

              The  system will free any whole pages in the specified
 region. All modifications will be lost and any
              swapped  out  pages  will  be discarded. Subsequent
              access to the region will result in a zero-fill-ondemand
 fault as though it is being accessed for the
              first time. Reserved swap space is not affected  by
              this call.  Ensure that resources are reserved

DESCRIPTION    [Toc]    [Back]

       The  madvise()  function  permits  a process to advise the
       system about its expected future behavior in referencing a
       mapped file or shared memory region.

NOTES    [Toc]    [Back]

       Only a few values of the behav parameter values are operational
 on Tru64 UNIX systems. Non-operational values cause
       the system to always return success (zero).

RETURN VALUES    [Toc]    [Back]

       Upon successful completion, the madvise() function returns
       zero. Otherwise, -1 is returned and errno is set to  indicate
 the error.

ERRORS    [Toc]    [Back]

       If  the  madvise() function fails, errno may be set to one
       of the following values: The behav parameter  is  invalid.
       The   behav   parameter   specifies   MADV_SPACEAVAIL  and
       resources cannot be reserved.

SEE ALSO    [Toc]    [Back]

       Functions: mmap(2), nmadvise(3)

[ Back ]
 Similar pages
Name OS Title
nmadvise Tru64 Advise the system of the expected paging behavior of a process (libnuma)
madvise HP-UX advise the system of a process's expected paging behavior
thrash IRIX thrash memory to explore paging behavior
munlockall Linux reenable paging for calling process
mlockall Linux disable paging for calling process
uswitch Tru64 Get or set compatibility environment specific behavior for a calling process through the uswitch val...
swapinfo HP-UX system paging space information
swapon HP-UX enable device or file system for paging
dmMPEG1AudioHeaderGetBlockBytes IRIX gets expected length in bytes of any compressed data block.
SSL_CTX_set_quiet_shutdown Tru64 Manipulate shutdown behavior
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service