From owner-freebsd-hackers Sat Feb 24 12:57:11 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from guild.plethora.net (guild.plethora.net [205.166.146.8]) by hub.freebsd.org (Postfix) with ESMTP id 488D137B401 for ; Sat, 24 Feb 2001 12:57:05 -0800 (PST) (envelope-from seebs@guild.plethora.net) Received: from guild.plethora.net (seebs@localhost.plethora.net [127.0.0.1]) by guild.plethora.net (8.10.1/8.10.1) with ESMTP id f1OKus618979 for ; Sat, 24 Feb 2001 14:56:57 -0600 (CST) Message-Id: <200102242056.f1OKus618979@guild.plethora.net> From: seebs@plethora.net (Peter Seebach) Reply-To: seebs@plethora.net (Peter Seebach) To: freebsd-hackers@freebsd.org Subject: Re: Setting memory allocators for library functions. In-reply-to: Your message of "Sat, 24 Feb 2001 21:48:27 +0100." <9469.983047707@critter> Date: Sat, 24 Feb 2001 14:56:54 -0600 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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