From owner-freebsd-stable@FreeBSD.ORG Thu Jul 24 06:26:36 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 149A537B401; Thu, 24 Jul 2003 06:26:36 -0700 (PDT) Received: from moo.sysabend.org (moo.sysabend.org [66.111.41.70]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5AE3943FAF; Thu, 24 Jul 2003 06:26:35 -0700 (PDT) (envelope-from ragnar@sysabend.org) Received: by moo.sysabend.org (Postfix, from userid 1004) id 98C4910DC; Thu, 24 Jul 2003 06:26:34 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by moo.sysabend.org (Postfix) with ESMTP id 968F510D0; Thu, 24 Jul 2003 06:26:34 -0700 (PDT) Date: Thu, 24 Jul 2003 06:26:34 -0700 (PDT) From: Jamie Bowden To: Don Lewis In-Reply-To: <200307240152.h6O1qCM7053256@gw.catspoiler.org> Message-ID: <20030724062152.G50019-100000@moo.sysabend.org> X-representing: Only myself. X-badge: We don't need no stinking badges. X-obligatory-profanity: Fuck X-moo: Moo. MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: brooks@one-eyed-alien.net cc: mkb@mukappabeta.de cc: freebsd-stable@FreeBSD.org cc: barney@databus.com cc: gabor@vmunix.com 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 13:26:36 -0000 On Wed, 23 Jul 2003, Don Lewis wrote: > On 23 Jul, Brooks Davis wrote: > > On Thu, Jul 24, 2003 at 12:36:54AM +0200, Matthias Buelow wrote: > >> Wasn't there a sysctl flag to enable/disable overcommitting? > >> I think I remember something but I can't find it; it might > >> not have been on FreeBSD. > > No there isn't. Overcommit is a fundamental design feature of the BSD > > VM. If you don't like it, find an OS that doesn't do it. The only one > > I can think of off the top of my head in Irix where I've found it to be > > a serious pain in the ass. > > I think it's a pain in the ass when swap runs out and the kernel decides > to kill off my X11 server to fix the problem. In addition to losing > everything I'm working on, it also hoses the console. The only reason > that I can avoid having to hit the reset switch and risking further > system damage is that I have another machine that I can ssh in from to > do a clean shutdown. Irix allows for use of what it calls 'vswap' as well, which is just a file that lives on a normal filesystem that the system can fall back on when actual RAM and swap are exhausted. It allows for extremely large commits on memory limited systems while guaranteeing that it has somewhere to page out to if necessary. The poster above may not like Irix, but I do. There's a lot of good stuff in there, but SGI aren't the best at telling people it exists and how to use it. > I used SunOS 4.x, which did not overcommit, for many years. Its typical > failure mode when swap was exhausted is that large processes would get a > error when they attempted to fork() and large memory alloction requests > would fail. Everything else would generally keep working because > smaller memory allocation requests would still succeed. This usually > gave me enough time to take corrective action (generally by cleaning up > junk files in /tmp which was a tmpfs mount). My experience with SunOS 4.x was mostly positive (I chose FreeBSD over Linux/Slakware back in 94 due to FBSD being far closer to what I dealt with daily), but never with respect to running out of system resources. SunOS was happy right up to the point where it started screaming and then usually panic'd. Jamie Bowden -- "It was half way to Rivendell when the drugs began to take hold" Hunter S Tolkien "Fear and Loathing in Barad Dur" Iain Bowen