Date: Fri, 02 Mar 2001 15:42:00 -0800 (PST) From: John Baldwin <jhb@FreeBSD.org> To: Alfred Perlstein <bright@wintelcom.net> Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org, Bruce Evans <bde@zeta.org.au> Subject: Re: cvs commit: src/sys/kern kern_intr.c Message-ID: <XFMail.010302154200.jhb@FreeBSD.org> In-Reply-To: <20010302153031.I8663@fw.wintelcom.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On 02-Mar-01 Alfred Perlstein wrote: > * 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. Err, where do you think I cut n pasted that text from? :) -- 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.010302154200.jhb>