aboutsummaryrefslogtreecommitdiff
path: root/share/man/man9/malloc.9
diff options
context:
space:
mode:
authorRobert Watson <rwatson@FreeBSD.org>2003-01-18 03:25:40 +0000
committerRobert Watson <rwatson@FreeBSD.org>2003-01-18 03:25:40 +0000
commiteef9bd4c3fd6bd23eb6591cbc0ac97caf6158ab2 (patch)
treef88f778ac5b82b3f5f01d6d352a372cfd8035fc9 /share/man/man9/malloc.9
parentda5e9a5bd6b87442ac00fcb57a128d4ac222730c (diff)
downloadsrc-eef9bd4c3fd6bd23eb6591cbc0ac97caf6158ab2.tar.gz
src-eef9bd4c3fd6bd23eb6591cbc0ac97caf6158ab2.zip
Caution programmers not to confuse M_DONTWAIT with M_NOWAIT. They
are not the same. Suggested by: Hiten Pandya <hiten@unixdaemons.com>
Notes
Notes: svn path=/head/; revision=109459
Diffstat (limited to 'share/man/man9/malloc.9')
-rw-r--r--share/man/man9/malloc.911
1 files changed, 11 insertions, 0 deletions
diff --git a/share/man/man9/malloc.9 b/share/man/man9/malloc.9
index ff07220e1bcc..601389731719 100644
--- a/share/man/man9/malloc.9
+++ b/share/man/man9/malloc.9
@@ -159,6 +159,17 @@ is defined to be 0, meaning that blocking operation is the default.
Also note that
.Dv M_NOWAIT
is required when running in an interrupt context.
+.Pp
+Programmers should be careful not to confuse
+.Dv M_NOWAIT ,
+the
+.Fn malloc
+flag, with
+.Dv M_DONTWAIT ,
+an
+.Xr mbuf 9
+allocation flag, which is not a valid argument to
+.Fn malloc .
.It Dv M_WAITOK
Indicates that it is Ok to wait for resources. It is unconveniently
defined as 0 so care should be taken never to compare against this value