Hi,Exactly, the address returned is not really useful, the improved error checking is useful.
On Sun, Mar 25, 2007 at 06:30:34PM +0200, Folkert van Heusden wrote:That's interesting, so many different behaviors! Personally, I still preferEntirely for entertainment: AIX (5.3) returns NULL, IRIX returns a validI'd say "feature", glibc's malloc also returns an address onThis is implementation defined-the standard allows for return of either
malloc(0).
null or an address.
address.
when malloc(0) returns zero because it makes it easier to catch errors.