From owner-freebsd-hackers Sat Feb 24 13: 3: 6 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from gw.gbch.net (gw.gbch.net [203.24.22.66]) by hub.freebsd.org (Postfix) with SMTP id 5383D37B491 for ; Sat, 24 Feb 2001 13:03:01 -0800 (PST) (envelope-from gjb@gbch.net) Received: (qmail 33212 invoked by uid 1001); 25 Feb 2001 07:02:58 +1000 User-Agent: GJB-Post 2.13 17-Feb-2001 X-Operating-System: FreeBSD 4.1-RELEASE i386 Message-Id: Date: Sun, 25 Feb 2001 07:02:58 +1000 From: Greg Black To: Poul-Henning Kamp Cc: seebs@plethora.net (Peter Seebach), freebsd-hackers@FreeBSD.ORG Subject: Re: Setting memory allocators for library functions. References: <9469.983047707@critter> In-reply-to: <9469.983047707@critter> of Sat, 24 Feb 2001 21:48:27 +0100 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Poul-Henning Kamp wrote: > 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. If the intended behaviour of malloc is that it returns a pointer to memory that is allocated but which may not be available when accessed, the man page needs to be corrected to make this defect in the implementation clear. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message