Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 24 Feb 2001 14:56:54 -0600
From:      seebs@plethora.net (Peter Seebach)
To:        freebsd-hackers@freebsd.org
Subject:   Re: Setting memory allocators for library functions. 
Message-ID:  <200102242056.f1OKus618979@guild.plethora.net>
In-Reply-To: Your message of "Sat, 24 Feb 2001 21:48:27 %2B0100." <9469.983047707@critter> 

next in thread | previous in thread | raw e-mail | index | archive | help
In message <9469.983047707@critter>, Poul-Henning Kamp writes:
>The guarantee is "If malloc returns NULL there is no memory you can use".

No, it's "if the memory is not available, malloc returns NULL".

>That doesn't mean that just because != NULL is returned that memory
>will in fact be available.

Sure, and access to stdin can segfault too.  If we want a decent quality of
implementation for C, malloc can't lie.

-s

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




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