In message <199905081332.paa07...@labinfo.iet.unipi.it> Luigi Rizzo writes:
:       m = m_get(M_WAIT, ...)
: looking at the code, it seems that m_get() _can_ return a NULL pointer
: even if one specifies M_WAIT.

Looking at the man page for malloc:
     M_WAITOK
             indicates that it is Ok to wait for resources.  It is unconve-
             niently defined as 0 so care should be taken never to compare
             against this value directly or try to AND it as a flag.  The de-
             fault operation is to block until the memory allocation succeeds.
             malloc() can only return NULL if M_NOWAIT is specified.

Sounds like a bug to me.

Warner


To Unsubscribe: send mail to majord...@freebsd.org
with "unsubscribe freebsd-current" in the body of the message

Reply via email to