realloc

Larry Jones scjones at sdrc.UUCP
Sat Apr 1 09:12:32 AEST 1989


In article <cYAd3My00UkaI1vvZr at andrew.cmu.edu>, bader+ at andrew.cmu.edu (Miles Bader) writes:
> scjones at sdrc.UUCP (Larry Jones) writes:
> > And when handed a non-NULL pointer and a zero size, it acts like
> > free.  This behavior is required by the draft ANSI Standard.
> 
> Does it return NULL in this case (when it acts like free)?  If so, how
> extra-ordinarily convenient...

It's implementation defined -- the implementation is allowed to
return either a NULL pointer or a pointer to a zero-sized object
(although many people find that concept quite repugnant, that's
the way many existing implementations behave).

----
Larry Jones                         UUCP: uunet!sdrc!scjones
SDRC                                      scjones at sdrc.UU.NET
2000 Eastman Dr.                    BIX:  ltl
Milford, OH  45150                  AT&T: (513) 576-2070
"When all else fails, read the directions."



More information about the Comp.std.c mailing list