mirror of
https://github.com/opnsense/src.git
synced 2026-04-21 22:27:47 -04:00
Explicitely state that M_USE_RESERVE requires M_NOWAIT, using assertion.
Reviewed by: alc MFC after: 2 weeks
This commit is contained in:
parent
94e7929e2c
commit
962b064afe
1 changed files with 3 additions and 0 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue