Subject: Re: m_get(), MGET(), and MGETHDR() with M_WAIT
To: Thorsten Lockert <tholo@SigmaSoft.COM>
From: Chris G Demetriou <>
List: tech-kern
Date: 06/05/1996 23:54:46
> > no, malloc(... M_WAIT) _cannot_ return NULL.  Like i noted, that's the
> > current implementation, and i'm not as much concerned about that as I
> > am about what the code using m_get(... M_WAIT ...) _should_ be doing.
> malloc(..., M_WAIT) is not allowed to return NULL.  Checking for a NULL
> return when called with M_WAIT is superflous.  However, perhaps some of
> the cases that now use _MWAIT and do check should be changed to M_NOWAIT?

You, too, have missed the point.

The question is not what the current implementation of m_get() does,
it's what the definition of m_get() says that m_get() will do.

if the definition of m_get() says that m_get() may return NULL if
M_WAIT is set, then we should be safe about using it, regardless of
what our current implementation does.  Our implementation may change,
or people might port our code to other systems.

It's becoming evident that i'm not going to get a useful answer to the
question of what the m_get/MGET "definition" (if any) says from this
mailing list...  *sigh*