Commit | Line | Data |
---|---|---|
189a2f10 | 1 | .\" Copyright (c) 1991, 1991 Regents of the University of California. |
50c0467c KM |
2 | .\" All rights reserved. |
3 | .\" | |
189a2f10 | 4 | .\" %sccs.include.redist.roff% |
50c0467c | 5 | .\" |
189a2f10 | 6 | .\" @(#)madvise.2 6.2 (Berkeley) %G% |
50c0467c | 7 | .\" |
189a2f10 CL |
8 | .Dd |
9 | .Dt MADVISE 2 | |
10 | .Os | |
11 | .Sh NAME | |
12 | .Nm madvise | |
13 | .Nd give advise about use of memory | |
14 | .Sh SYNOPSIS | |
15 | .Fn madvise "caddr_t addr" "int len" "int behav" | |
16 | .Sh DESCRIPTION | |
17 | The | |
18 | .Fn madvise | |
19 | system call | |
50c0467c KM |
20 | allows a process that has knowledge of its memory behavior |
21 | to describe it to the system. | |
189a2f10 CL |
22 | The known behaviors are given in |
23 | .Pa <sys/mman.h> : | |
24 | .Bd -literal | |
50c0467c KM |
25 | #define MADV_NORMAL 0 /* no further special treatment */ |
26 | #define MADV_RANDOM 1 /* expect random page references */ | |
27 | #define MADV_SEQUENTIAL 2 /* expect sequential references */ | |
28 | #define MADV_WILLNEED 3 /* will need these pages */ | |
29 | #define MADV_DONTNEED 4 /* don't need these pages */ | |
30 | #define MADV_SPACEAVAIL 5 /* insure that resources are reserved */ | |
189a2f10 CL |
31 | .Ed |
32 | .Sh SEE ALSO | |
33 | .Xr msync 2 , | |
34 | .Xr munmap 2 , | |
35 | .Xr mprotect 2 , | |
36 | .Xr mincore 2 | |
37 | .Sh HISTORY | |
38 | The | |
39 | .Fn madvise | |
40 | function call is | |
41 | .Ud . |