Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 23 Jul 2003 15:22:30 -0700
From:      Darryl Okahata <darrylo@soco.agilent.com>
To:        Barney Wolff <barney@databus.com>
Cc:        Gabor <gabor@vmunix.com>
Subject:   Re: malloc does not return null when out of memory 
Message-ID:  <200307232222.PAA26360@mina.soco.agilent.com>
In-Reply-To: Your message of "Wed, 23 Jul 2003 18:13:36 EDT." <20030723221336.GA26555@pit.databus.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
Barney Wolff <barney@databus.com> wrote:

> Shouldn't malloc return 0 when out of memory rather than returning
> an address that won't work?  I believe that was the complaint.  Presumably
> having NO_SWAPPING has something to do with it, but filling the swap
> might well do the same thing.

     Well, it goes against the man page, but FreeBSD typically never
returns NULL [*] when you run out of VM.  It's been this way for YEARS.

[*] -- Yes, it's annoying as h*ll, but that's the way it works.  I
       thought that there was a FAQ or handbook entry on this, but I
       couldn't find any.

-- 
	Darryl Okahata
	darrylo@soco.agilent.com

DISCLAIMER: this message is the author's personal opinion and does not
constitute the support, opinion, or policy of Agilent Technologies, or
of the little green men that have been following him all day.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200307232222.PAA26360>