diff options
author | Artur Grabowski <art@cvs.openbsd.org> | 2001-05-10 14:53:23 +0000 |
---|---|---|
committer | Artur Grabowski <art@cvs.openbsd.org> | 2001-05-10 14:53:23 +0000 |
commit | d6c14bce14f39209d29d39eeeed231f717e6a137 (patch) | |
tree | 29fead8f314b0b55dfc28a24a3f7c236834f5e92 /lib/libc | |
parent | 6dfd3edcfce606fdcb05dd53327f33921ec6e477 (diff) |
Slightly better explaination of the advices (cut 'n paste from sys/mman.h is
not good documentation) and document the new ones.
Also, remove the BUGS section that said it wasn't implemented.
Diffstat (limited to 'lib/libc')
-rw-r--r-- | lib/libc/sys/madvise.2 | 33 |
1 files changed, 18 insertions, 15 deletions
diff --git a/lib/libc/sys/madvise.2 b/lib/libc/sys/madvise.2 index 8fe94c7e105..2909bea0208 100644 --- a/lib/libc/sys/madvise.2 +++ b/lib/libc/sys/madvise.2 @@ -1,4 +1,4 @@ -.\" $OpenBSD: madvise.2,v 1.10 1999/06/29 14:10:05 aaron Exp $ +.\" $OpenBSD: madvise.2,v 1.11 2001/05/10 14:53:22 art Exp $ .\" $NetBSD: madvise.2,v 1.7 1995/12/27 21:17:02 jtc Exp $ .\" .\" Copyright (c) 1991, 1993 @@ -51,16 +51,23 @@ The system call allows a process that has knowledge of its memory behavior to describe it to the system. -The known behaviors are given in -.Pa <sys/mman.h> : -.Bd -literal -#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 */ -.Ed +The possible behaviors are: +.Bl -tag -width MADV_SEQUENTIAL +.It Dv MADV_NORMAL +No further special treatment needed. +.It Dv MADV_RANDOM +Expect random page access patterns. +.It Dv MADV_SEQUENTIAL +Expect sequential page references. +.It Dv MADV_WILLNEED +The pages will be referenced soon. +.It Dv MADV_DONTNEED +The pages will not be referenced soon. +.It Dv MADV_SPACEAVAIL +Insure that resources are reserved. +.It Dv MADV_FREE +The pages don't contain any useful data and can be recycled. +.El .Sh RETURN VALUES Upon successful completion, a value of 0 is returned. @@ -73,10 +80,6 @@ is set to indicate the error. .Xr mprotect 2 , .Xr msync 2 , .Xr munmap 2 -.Sh BUGS -The -.Fn madvise -function is not implemented in the current vm subsystem. .Sh HISTORY The .Nm madvise |