Date: Sun, 9 May 1999 11:29:19 +1000 From: Bruce Evans <bde@zeta.org.au> To: imp@harmony.village.org, luigi@labinfo.iet.unipi.it Cc: current@FreeBSD.ORG Subject: Re: m_get(M_WAIT, ...) _can_ return NULL ? Message-ID: <199905090129.LAA13409@godzilla.zeta.org.au>
next in thread | raw e-mail | index | archive | help
>: 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. Er, m_get != malloc M_WAIT != M_WAITOK Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199905090129.LAA13409>