summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2012-11-16 05:49:56 +0000
committerkib <kib@FreeBSD.org>2012-11-16 05:49:56 +0000
commit75f2aa672f6e783275adf2d16f6a8dc94635e278 (patch)
tree3d74a5b8b6164fc4f280a803eba07042005855c8
parent8d33709c9bf9e25c5dbf6ec1719f8ddea127a96b (diff)
downloadFreeBSD-src-75f2aa672f6e783275adf2d16f6a8dc94635e278.zip
FreeBSD-src-75f2aa672f6e783275adf2d16f6a8dc94635e278.tar.gz
Explicitely state that M_USE_RESERVE requires M_NOWAIT, using assertion.
Reviewed by: alc MFC after: 2 weeks
-rw-r--r--sys/vm/vm_page.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/vm/vm_page.h b/sys/vm/vm_page.h
index d9e4692..58d86b9 100644
--- a/sys/vm/vm_page.h
+++ b/sys/vm/vm_page.h
@@ -353,6 +353,9 @@ malloc2vm_flags(int malloc_flags)
{
int pflags;
+ KASSERT((malloc_flags & M_USE_RESERVE) == 0 ||
+ (malloc_flags & M_NOWAIT) != 0,
+ ("M_USE_RESERVE requires M_NOWAIT"));
pflags = (malloc_flags & M_USE_RESERVE) != 0 ? VM_ALLOC_INTERRUPT :
VM_ALLOC_SYSTEM;
if ((malloc_flags & M_ZERO) != 0)
OpenPOWER on IntegriCloud