diff options
| author | Alan Cox <alc@FreeBSD.org> | 2007-07-19 17:23:20 +0000 |
|---|---|---|
| committer | Alan Cox <alc@FreeBSD.org> | 2007-07-19 17:23:20 +0000 |
| commit | 40e4089d343aa9aa7ffd172dd74133b47ffbdefe (patch) | |
| tree | 2f4202591f4ff2a466548906dc6ce4c2eefba15d /share/man/man9/contigmalloc.9 | |
| parent | 57bdeb396ceedce8631835dd62f0dd656f43987f (diff) | |
Notes
Diffstat (limited to 'share/man/man9/contigmalloc.9')
| -rw-r--r-- | share/man/man9/contigmalloc.9 | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/share/man/man9/contigmalloc.9 b/share/man/man9/contigmalloc.9 index 361e44ea24be..f0797be61276 100644 --- a/share/man/man9/contigmalloc.9 +++ b/share/man/man9/contigmalloc.9 @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 10, 2004 +.Dd July 19, 2007 .Dt CONTIGMALLOC 9 .Os .Sh NAME @@ -77,7 +77,14 @@ behaviour as follows: .Bl -tag -width indent .It Dv M_ZERO Causes the allocated physical memory to be zero filled. +.It Dv M_NOWAIT +Causes +.Fn contigmalloc +to return +.Dv NULL +if the request cannot be immediately fulfilled due to resource shortage. .El +.Pp Other flags (if present) are ignored. .Pp The @@ -88,10 +95,11 @@ function deallocates memory allocated by a previous call to The .Fn contigmalloc function does not sleep waiting for memory resources to be freed up, -but instead scans available physical memory a small number of times -for a suitably sized free address range before giving up. -Memory allocation is done on a first-fit basis, starting from the -top of the provided address range. +but instead actively reclaims pages before giving up. +However, unless +.Dv M_NOWAIT +is specified, it may select a page for reclamation that must first be +written to backing storage, causing it to sleep. .Sh RETURN VALUES The .Fn contigmalloc |
