Life after free?
Karl Heuer
karl at haddock.ima.isc.com
Sat Sep 29 17:02:45 AEST 1990
In article <5620 at stpstn.UUCP> lerman at stpstn.UUCP (Ken Lerman) writes:
>In article <quan.654410256 at sol> quan at sol.surv.utas.oz (Stephen Quan) writes:
>->Any comments on free-ing tmp before it is return-ed?
>
>Not only is it sensible, the semantics of free require it.
No. An early manual once made the mistake of describing the local
implementation instead of the interface%, but not all versions do it that
way. Some modern systems still include such a guarantee, but only to provide
backward compatibility to the programs that were foolish enough to depend on
it. The Standard doesn't even guarantee that you can *look* at the value
remaining in tmp, much less dereference it.
Karl W. Z. Heuer (karl at kelp.ima.isc.com or ima!kelp!karl), The Walking Lint
________
% Okay, I'm exaggerating a bit. It was a poorly-designed interface, though.
More information about the Comp.lang.c
mailing list