From owner-cvs-all Fri Mar 2 15:42:28 2001 Delivered-To: cvs-all@freebsd.org Received: from meow.osd.bsdi.com (meow.osd.bsdi.com [204.216.28.88]) by hub.freebsd.org (Postfix) with ESMTP id 2B6CD37B719; Fri, 2 Mar 2001 15:42:24 -0800 (PST) (envelope-from jhb@FreeBSD.org) Received: from laptop.baldwin.cx (john@jhb-laptop.osd.bsdi.com [204.216.28.241]) by meow.osd.bsdi.com (8.11.2/8.11.2) with ESMTP id f22NbtA05401; Fri, 2 Mar 2001 15:37:55 -0800 (PST) (envelope-from jhb@FreeBSD.org) Message-ID: X-Mailer: XFMail 1.4.0 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <20010302153031.I8663@fw.wintelcom.net> Date: Fri, 02 Mar 2001 15:42:00 -0800 (PST) From: John Baldwin To: Alfred Perlstein Subject: Re: cvs commit: src/sys/kern kern_intr.c Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org, Bruce Evans Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On 02-Mar-01 Alfred Perlstein wrote: > * John Baldwin [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 -- 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