From owner-cvs-all Fri Mar 2 15:30:39 2001 Delivered-To: cvs-all@freebsd.org Received: from fw.wintelcom.net (ns1.wintelcom.net [209.1.153.20]) by hub.freebsd.org (Postfix) with ESMTP id 2F4ED37B71A; Fri, 2 Mar 2001 15:30:32 -0800 (PST) (envelope-from bright@fw.wintelcom.net) Received: (from bright@localhost) by fw.wintelcom.net (8.10.0/8.10.0) id f22NUVT21784; Fri, 2 Mar 2001 15:30:31 -0800 (PST) Date: Fri, 2 Mar 2001 15:30:31 -0800 From: Alfred Perlstein To: John Baldwin Cc: Bruce Evans , 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> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from jhb@FreeBSD.org on Fri, Mar 02, 2001 at 09:22:52AM -0800 X-all-your-base: are belong to us. Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG * 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. -- -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