Date: Fri, 2 Mar 2001 15:30:31 -0800 From: Alfred Perlstein <bright@wintelcom.net> To: John Baldwin <jhb@FreeBSD.org> Cc: Bruce Evans <bde@zeta.org.au>, cvs-all@FreeBSD.org, cvs-committers@FreeBSD.org Subject: Re: cvs commit: src/sys/kern kern_intr.c Message-ID: <20010302153031.I8663@fw.wintelcom.net> In-Reply-To: <XFMail.010302092252.jhb@FreeBSD.org>; from jhb@FreeBSD.org on Fri, Mar 02, 2001 at 09:22:52AM -0800 References: <Pine.BSF.4.21.0103022332480.11325-100000@besplex.bde.org> <XFMail.010302092252.jhb@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
* John Baldwin <jhb@FreeBSD.org> [010302 09:23] wrote: > > 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. malloc(9) explains this, it's just a bit obtuse about it: "malloc() can only return NULL if M_NOWAIT is specified." under the section explaining M_WAITOK. -- -Alfred Perlstein - [bright@wintelcom.net|alfred@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?20010302153031.I8663>