On 2002-11-22 16:25, Marc Recht <[EMAIL PROTECTED]> wrote: > Hi! > > A malloc(0) returns always 0x800 on my system. This causes some third-party > software to fail, because they expect malloc(0) to return NULL. Is this a > bug or a feature? malloc(3) doesn't mention anything.
malloc(3) does mention something. Look at the description of the V malloc option. In the manpage you will also find various ways of turning this option on or off for your programs. : V Attempting to allocate zero bytes will return a NULL pointer : instead of a valid pointer. (The default behavior is to make a : minimal allocation and return a pointer to it.) This option is : provided for System V compatibility. This option is incompatible : with the ``X'' option. To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message