free and malloc
Joe Chapman
joe at emacs.UUCP
Fri Oct 11 01:28:32 AEST 1985
<>
>> Has anyone out there REALLY used "free"? I'm very curious about this...
Well, I've used free immediately after doing a malloc; the routines in
question needed a considerable amount of space for some nonsensical
operation, and in the convolution which ensued there were several
different places where the function might legitimately return. Since
free doesn't trash the space, but merely makes it available for re-use,
I wasn't living so perilously as it might appear.
I should probably caution the folks at home against trying this; were I
rewriting that stuff today I'd certainly be a bit more conventional and
less obscure (i.e., put the free at the bottom of the function and goto
it), but I was young then...
--
Joe Chapman decvax!cca!emacs!joe joe at cca-unix
"The dubious practices admitted to herein are no longer
even my own, and the fabric of the software with which
I and my employer are now associated is devoid of even
a suggestion of them."
More information about the Comp.lang.c
mailing list