Newsgroups: comp.lang.c
Path: utzoo!henry
From: henry@zoo.toronto.edu (Henry Spencer)
Subject: Re: scope of malloc
Message-ID: <1990Nov13.193545.9383@zoo.toronto.edu>
Organization: U of Toronto Zoology
References: <1990Nov07.134942.7355@virtech.uucp> <1990Nov7.234315.15508@athena.mit.edu> <3729@skye.ed.ac.uk> <14413@smoke.brl.mil> <2182@kraftbus.opal.cs.tu-berlin.de>
Date: Tue, 13 Nov 90 19:35:45 GMT

In article <2182@kraftbus.opal.cs.tu-berlin.de> net@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@zoo.toronto.edu   utzoo!henry
