From owner-freebsd-stable@FreeBSD.ORG Thu Jul 24 09:45:24 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 7010237B401 for ; Thu, 24 Jul 2003 09:45:24 -0700 (PDT) Received: from pit.databus.com (p70-227.acedsl.com [66.114.70.227]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8976943FCB for ; Thu, 24 Jul 2003 09:45:23 -0700 (PDT) (envelope-from barney@pit.databus.com) Received: from pit.databus.com (localhost [127.0.0.1]) by pit.databus.com (8.12.9/8.12.9) with ESMTP id h6OGjMn8040277; Thu, 24 Jul 2003 12:45:22 -0400 (EDT) (envelope-from barney@pit.databus.com) Received: (from barney@localhost) by pit.databus.com (8.12.9/8.12.9/Submit) id h6OGjMmG040276; Thu, 24 Jul 2003 12:45:22 -0400 (EDT) (envelope-from barney) Date: Thu, 24 Jul 2003 12:45:22 -0400 From: Barney Wolff To: Chuck Swiger Message-ID: <20030724164522.GA39964@pit.databus.com> References: <20030723173427.GA72876@vmunix.com> <20030723173427.GA72876@vmunix.com> <5.2.0.9.0.20030723234250.052821e8@192.168.0.12> <20030724070936.GA16762@rot13.obsecurity.org> <3F1FF81F.5050701@mac.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3F1FF81F.5050701@mac.com> User-Agent: Mutt/1.4.1i cc: freebsd-stable@freebsd.org 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 List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Jul 2003 16:45:24 -0000 On Thu, Jul 24, 2003 at 11:15:43AM -0400, Chuck Swiger wrote: > > +/* write a single byte per page to disable overcommit behavior */ > +static int malloc_overcommit; Won't this merely die in malloc, not return 0? I don't think that's the behavior the original poster was looking for. The wanted behavior would be fairly expensive to achieve, especially on an smp machine. -- Barney Wolff http://www.databus.com/bwresume.pdf I'm available by contract or FT, in the NYC metro area or via the 'Net.