From owner-freebsd-hackers Fri Jul 16 10:18: 5 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from pcnet1.pcnet.com (pcnet1.pcnet.com [204.213.232.3]) by hub.freebsd.org (Postfix) with ESMTP id 8F05314E34 for ; Fri, 16 Jul 1999 10:18:01 -0700 (PDT) (envelope-from eischen@vigrid.com) Received: (from eischen@localhost) by pcnet1.pcnet.com (8.8.7/PCNet) id NAA19250; Fri, 16 Jul 1999 13:16:40 -0400 (EDT) Date: Fri, 16 Jul 1999 13:16:40 -0400 (EDT) From: Daniel Eischen Message-Id: <199907161716.NAA19250@pcnet1.pcnet.com> To: dillon@apollo.backplane.com, sean.witham@asa.co.uk Subject: Re: Swap overcommit (was Re: Replacement for grep(1) (part 2)) Cc: dcs@newsguy.com, drosih@rpi.edu, freebsd-hackers@FreeBSD.ORG, tech-userlevel@netbsd.org Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > I'm sorry, but when you write code for a safety related system you > do not dynamically allocate memory at all. It's all essentially static. > There is no issue with the memory resource. Besides, none of the BSD's are > certified for any of that stuff that I know of. Sometimes it's not feasible to statically allocate memory. You dynamically allocate all the memory you need at program initialization (and no, we don't want to manage a pool of memory ourselves - that's what the OS is for). Note that languages such as Ada raise exceptions when memory allocation fails. The underlying run-time relies on malloc returning null in order to raise an exception. Normally, programs written in Ada take great care to gracefully handle these exceptions. All the C programs that we've ever written also take great care in handling NULL returns from malloc. I have no problem with overcommit, but I can see the need that some folks have for turning it off. If you don't want to write the code to allow this, that's fine - you don't want/need it, so why should you? But if other folks see a need for it, let _them_ write the hooks for it :-) Dan Eischen eischen@vigrid.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message