Subject: Re: m_get(), MGET(), and MGETHDR() with M_WAIT
To: Chris G Demetriou <>
From: Paul Kranenburg <>
List: tech-kern
Date: 06/05/1996 22:28:26
> What i'm wondering is, in their 'well-documented' definitions, are
> they ever allowed to return NULL in that case?

Well, Stevens says that the return value of m_get() should always be checked,
but his argument for this seems rather off the mark.

Looking at the definition of MGET() and m_retry(), it's obvious that the
answer depends on whether `malloc(.., M_WAIT)'  can ever return NULL.
It appears that it can, given that kmem_malloc() in vm_kern.c can.

If told to wait, kmem_malloc() either panics or return 0 regardless.
This should probably be fixed..