On Wed, Jun 28, 2006 at 08:10:45PM +0200, Andre Albsmeier wrote:
> (Now malloc returns NULL and firefox doesn't interpret the
> result as a pointer to some allocated memory and therefore
> doesn't use it).

Return NULL for malloc(0) is one of two possible implementations. The
other behaviour is to generate a unique pointer for each call. Both
behaviours are intentionally allowed by the standard and code making
assumptions about either is broken.

It should be added that returning NULL for malloc(0) is consistent with
realloc, so it is actually nicer.

Joerg
_______________________________________________
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to