Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 02 Mar 2001 09:22:52 -0800 (PST)
From:      John Baldwin <jhb@FreeBSD.org>
To:        Bruce Evans <bde@zeta.org.au>
Cc:        cvs-all@FreeBSD.org, cvs-committers@FreeBSD.org
Subject:   Re: cvs commit: src/sys/kern kern_intr.c
Message-ID:  <XFMail.010302092252.jhb@FreeBSD.org>
In-Reply-To: <Pine.BSF.4.21.0103022332480.11325-100000@besplex.bde.org>

next in thread | previous in thread | raw e-mail | index | archive | help

On 02-Mar-01 Bruce Evans wrote:
> On Thu, 1 Mar 2001, John Baldwin wrote:
> 
>> jhb         2001/03/01 22:07:39 PST
>> 
>>   Modified files:
>>     sys/kern             kern_intr.c 
>>   Log:
>>   Ok, the kernel will panic in kmem_malloc() if the kernel map is full, so
>>   malloc with M_WAITOK can't actually return NULL.  I wish I could get two
>>   people to give me the same answer about this when I ask...
> 
> Erm, this (non-returning of malloc with M_WAITOK) is clearly documented
> in malloc.9.  The panic is an implementation detail so it should not
> be documented.  Maybe we should have a Great Renaming for malloc() like
> we did for mtx_enter() to get rid of the evil flags :-).

Heh.  So officially for the final and last time:

             malloc() can only return NULL if M_NOWAIT is specified.

> Bruce 

-- 

John Baldwin <jhb@FreeBSD.org> -- http://www.FreeBSD.org/~jhb/
PGP Key: http://www.baldwin.cx/~john/pgpkey.asc
"Power Users Use the Power to Serve!"  -  http://www.FreeBSD.org/

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.010302092252.jhb>