From owner-freebsd-stable@FreeBSD.ORG Wed Jul 23 15:22:33 2003 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DCDE937B404 for ; Wed, 23 Jul 2003 15:22:33 -0700 (PDT) Received: from msgbas1x.cos.agilent.com (msgbas1x.cos.agilent.com [192.25.240.36]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0FE9143F75 for ; Wed, 23 Jul 2003 15:22:33 -0700 (PDT) (envelope-from darrylo@soco.agilent.com) Received: from relcos2.cos.agilent.com (relcos2.cos.agilent.com [130.29.152.237]) by msgbas1x.cos.agilent.com (Postfix) with ESMTP id E551115CE4; Wed, 23 Jul 2003 16:22:29 -0600 (MDT) Received: from mina.soco.agilent.com (mina.soco.agilent.com [141.121.54.157]) by relcos2.cos.agilent.com (Postfix) with ESMTP id CE69D21; Wed, 23 Jul 2003 16:22:31 -0600 (MDT) Received: from mina.soco.agilent.com (darrylo@localhost [127.0.0.1]) SMKit7.1.1_Agilent) with ESMTP id PAA26360; Wed, 23 Jul 2003 15:22:31 -0700 (PDT) Message-Id: <200307232222.PAA26360@mina.soco.agilent.com> To: Barney Wolff In-Reply-To: Your message of "Wed, 23 Jul 2003 18:13:36 EDT." <20030723221336.GA26555@pit.databus.com> Mime-Version: 1.0 (generated by tm-edit 1.7) Content-Type: text/plain; charset=US-ASCII Date: Wed, 23 Jul 2003 15:22:30 -0700 From: Darryl Okahata cc: freebsd-stable@freebsd.org cc: Gabor Subject: Re: malloc does not return null when out of memory X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Darryl Okahata List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Jul 2003 22:22:34 -0000 Barney Wolff wrote: > Shouldn't malloc return 0 when out of memory rather than returning > an address that won't work? I believe that was the complaint. Presumably > having NO_SWAPPING has something to do with it, but filling the swap > might well do the same thing. Well, it goes against the man page, but FreeBSD typically never returns NULL [*] when you run out of VM. It's been this way for YEARS. [*] -- Yes, it's annoying as h*ll, but that's the way it works. I thought that there was a FAQ or handbook entry on this, but I couldn't find any. -- Darryl Okahata darrylo@soco.agilent.com DISCLAIMER: this message is the author's personal opinion and does not constitute the support, opinion, or policy of Agilent Technologies, or of the little green men that have been following him all day.