xref: /csrg-svn/lib/libc/sys/madvise.2 (revision 62903)
1*62903Sbostic.\" Copyright (c) 1991, 1993
2*62903Sbostic.\"	The Regents of the University of California.  All rights reserved.
349897Smckusick.\"
450801Scael.\" %sccs.include.redist.roff%
549897Smckusick.\"
6*62903Sbostic.\"	@(#)madvise.2	8.1 (Berkeley) 06/09/93
749897Smckusick.\"
850801Scael.Dd
950801Scael.Dt MADVISE 2
1050801Scael.Os
1150801Scael.Sh NAME
1250801Scael.Nm madvise
1350801Scael.Nd give advise about use of memory
1450801Scael.Sh SYNOPSIS
1550801Scael.Fn madvise "caddr_t addr" "int len" "int behav"
1650801Scael.Sh DESCRIPTION
1750801ScaelThe
1850801Scael.Fn madvise
1950801Scaelsystem call
2049897Smckusickallows a process that has knowledge of its memory behavior
2149897Smckusickto describe it to the system.
2250801ScaelThe known behaviors are given in
2350801Scael.Pa <sys/mman.h> :
2450801Scael.Bd -literal
2549897Smckusick#define	MADV_NORMAL	0	/* no further special treatment */
2649897Smckusick#define	MADV_RANDOM	1	/* expect random page references */
2749897Smckusick#define	MADV_SEQUENTIAL	2	/* expect sequential references */
2849897Smckusick#define	MADV_WILLNEED	3	/* will need these pages */
2949897Smckusick#define	MADV_DONTNEED	4	/* don't need these pages */
3049897Smckusick#define	MADV_SPACEAVAIL	5	/* insure that resources are reserved */
3150801Scael.Ed
3250801Scael.Sh SEE ALSO
3350801Scael.Xr msync 2 ,
3450801Scael.Xr munmap 2 ,
3550801Scael.Xr mprotect 2 ,
3650801Scael.Xr mincore 2
3750801Scael.Sh HISTORY
3850801ScaelThe
3962902Sbostic.Nm madvise
4062902Sbosticfunction first appeared in 4.4BSD.
41