In message <[EMAIL PROTECTED]>, Marc Recht writes:
>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.

Then you didnt read malloc(3) well enough:

     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.


-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
[EMAIL PROTECTED]         | 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 [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to