This is the mail archive of the libc-alpha@cygnus.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: [Andrew Pimlott <pimlott@abel.MATH.HARVARD.EDU>] realloc(p, 0) vs. free


Roland McGrath <roland@frob.com> writes:

> The only thing that is optional is whether malloc(0) returns null or
> a block that can be freed.

And let's be clear that while it's permissible under ANSI C for
malloc(0) to return null, any sane system returns a unique pointer
that can be freed.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]