From owner-freebsd-hackers Thu Jul 15 17:46:25 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from peach.ocn.ne.jp (peach.ocn.ne.jp [210.145.254.87]) by hub.freebsd.org (Postfix) with ESMTP id 7F02814F92 for ; Thu, 15 Jul 1999 17:46:23 -0700 (PDT) (envelope-from dcs@newsguy.com) Received: from newsguy.com by peach.ocn.ne.jp (8.9.1a/OCN) id JAA14217; Fri, 16 Jul 1999 09:45:47 +0900 (JST) Message-ID: <378E7FD7.3D607199@newsguy.com> Date: Fri, 16 Jul 1999 09:41:59 +0900 From: "Daniel C. Sobral" X-Mailer: Mozilla 4.6 [en] (Win98; I) X-Accept-Language: pt-BR,ja MIME-Version: 1.0 To: Andrew Reilly Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: Swap overcommit References: <199907141938.NAA05484@orthanc.ab.ca> <378DF4C8.5E7B4C44@newsguy.com> <19990716100808.A92294@gurney.reilly.home> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Andrew Reilly wrote: > > On Thu, Jul 15, 1999 at 11:48:41PM +0900, Daniel C. Sobral wrote: > > Actually, applications are written assuming that malloc() will not > > fail, generally speaking. > > Is this really the case? I'm pretty sure I've _never_ ignored the > possibility of a NULL return from malloc, and I've been using it > for nearly 20 years. I usually print a message and exit, but I > never ignore it. I thought that was pretty standard practise. You are always free to inspect how applications deal with malloc(), as far as open source software goes. Anyway, your "usual" behavior is to expect malloc() will not fail. To print a message and exit is to treat it as a fatal error, don't you agree? -- Daniel C. Sobral (8-DCS) dcs@newsguy.com dcs@freebsd.org "Would you like to go out with me?" "I'd love to." "Oh, well, n... err... would you?... ahh... huh... what do I do next?" To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message