validity of free() on later pointer operations
Stephen Clamage
steve at taumet.com
Fri Jul 13 07:42:23 AEST 1990
edward at runxtsa.runx.oz.au (Edward Birch) writes:
>I quote the manual here:
> The argument to "free" is a pointer to a block previosly allocated
> by "malloc"; after "free" is performed this space is made available
> for further allocation, but its contents are left undisturbed.
I wonder which manual that is. ANSI C makes no such guarantee. See
section 4.10.3 of the standard.
As Mr Birch also pointed out, if you play games with malloc/free, don't
expect your whiz-bang code to run on another system.
--
Steve Clamage, TauMetric Corp, steve at taumet.com
More information about the Comp.lang.c
mailing list