From owner-freebsd-hackers Sat Feb 24 12:48:26 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from critter.freebsd.dk (flutter.freebsd.dk [212.242.40.147]) by hub.freebsd.org (Postfix) with ESMTP id 14B0437B401 for ; Sat, 24 Feb 2001 12:48:22 -0800 (PST) (envelope-from phk@critter.freebsd.dk) Received: from critter (localhost [127.0.0.1]) by critter.freebsd.dk (8.11.1/8.11.1) with ESMTP id f1OKmRM09471; Sat, 24 Feb 2001 21:48:27 +0100 (CET) (envelope-from phk@critter.freebsd.dk) To: seebs@plethora.net (Peter Seebach) Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: Setting memory allocators for library functions. In-Reply-To: Your message of "Sat, 24 Feb 2001 14:43:47 CST." <200102242043.f1OKhl618691@guild.plethora.net> Date: Sat, 24 Feb 2001 21:48:27 +0100 Message-ID: <9469.983047707@critter> From: Poul-Henning Kamp Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In message <200102242043.f1OKhl618691@guild.plethora.net>, Peter Seebach writes : >In message <9402.983047348@critter>, Poul-Henning Kamp writes: >>>Well, no, but the sole available definition of "portable" says that it is >>>"portable" to assume that all the memory malloc can return is really >>>available. > >>No, this is not a guarantee. > >Yes, it is. If the memory isn't available, malloc returns NULL. The guarantee is "If malloc returns NULL there is no memory you can use". That doesn't mean that just because != NULL is returned that memory will in fact be available. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message