From owner-freebsd-stable@FreeBSD.ORG Wed Jul 23 20:46:22 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 9F69A37B401 for ; Wed, 23 Jul 2003 20:46:22 -0700 (PDT) Received: from cage.simianscience.com (cage.simianscience.com [64.7.134.1]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8D0DE43FA3 for ; Wed, 23 Jul 2003 20:46:19 -0700 (PDT) (envelope-from mike@sentex.net) Received: from house.sentex.net (fcage [192.168.0.2])h6O3kDlD072707; Wed, 23 Jul 2003 23:46:14 -0400 (EDT) (envelope-from mike@sentex.net) Message-Id: <5.2.0.9.0.20030723234250.052821e8@192.168.0.12> X-Sender: mdtancsa@192.168.0.12 X-Mailer: QUALCOMM Windows Eudora Version 5.2.0.9 Date: Wed, 23 Jul 2003 23:44:11 -0400 To: Kris Kennaway From: Mike Tancsa In-Reply-To: <20030723201536.A22031@citusc.usc.edu> References: <20030723173427.GA72876@vmunix.com> <20030723173427.GA72876@vmunix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Virus-Scanned: amavis-20020220 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 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 03:46:22 -0000 At 08:15 PM 7/23/2003 -0700, Kris Kennaway wrote: >On Wed, Jul 23, 2003 at 01:34:27PM -0400, Gabor wrote: > > > Here is the tail end of the output. It dies when trying to poke at > > the memory using memset. If I just malloc without the memset, it > > never even dies. > >Ah, the annual "memory overcommit" thread. I thought we were overdue >for one. But why does the man page for malloc (3) say, If malloc() fails, a NULL pointer is returned. ---Mike -------------------------------------------------------------------- Mike Tancsa, tel +1 519 651 3400 Sentex Communications, mike@sentex.net Providing Internet since 1994 www.sentex.net Cambridge, Ontario Canada www.sentex.net/mike