scope of malloc
Henry Spencer
henry at zoo.toronto.edu
Wed Nov 14 06:35:45 AEST 1990
In article <2182 at kraftbus.opal.cs.tu-berlin.de> net at tubopal.UUCP (Oliver Laumann) writes:
>You also keep mentioning the argument that alloca() is not needed. If
>this is true, then how do you make sure that in the following function,
>which invokes another function that is supplied by user, the memory is
>freed in case the user-supplied function doesn't return (i.e. invokes
>longjmp())? --
How do you make sure that you get control back to perform other forms
of cleanup, e.g. buffer flushing? The answer is, you tell the user
"the function you supply must return normally, not by longjmp()".
--
"I don't *want* to be normal!" | Henry Spencer at U of Toronto Zoology
"Not to worry." | henry at zoo.toronto.edu utzoo!henry
More information about the Comp.lang.c
mailing list