[PATCH v2 3/4] Say malloc (0) != NULL is now common; resection
Mark Harris
mark.hsj@gmail.com
Fri Feb 13 00:59:10 GMT 2026
Paul Eggert wrote:
> To clarify this I could add further wording saying something like "There
> are two possible behaviors, and everybody but IBM AIX does it the GNU way."
There have been numerous implementations of malloc() that return NULL
for size == 0, for example DEC OSF/1, and Borland C++ for Windows.
Even if only considering implementations that are still in use it is
not credible to claim that there is only one implementation that does
this, given the large number of implementations for various platforms
and the fact that there is no list of all of them and no way to know
which are in use.
- Mark
More information about the Libc-alpha
mailing list