Path: utzoo!attcan!uunet!lll-winken!lll-tis!helios.ee.lbl.gov!nosc!ucsd!rutgers!att!chinet!les From: les@chinet.UUCP (Leslie Mikesell) Newsgroups: comp.lang.c Subject: Re: alloca(), #if, and other controversial things... Message-ID: <6358@chinet.UUCP> Date: 22 Aug 88 22:41:17 GMT References: <8808171410.AA05337@ucbvax.Berkeley.EDU> <1259@garth.UUCP> <1270@garth.UUCP> <355@sdrc.UUCP> Reply-To: les@chinet.UUCP (Leslie Mikesell) Organization: Chinet - Public Access Unix Lines: 15 In article <355@sdrc.UUCP> scjones@sdrc.UUCP (Larry Jones) writes: > >Just to confuse the discussion further, what about machines / operating >systems which do not have a stack? [ description deleted] >..... Seems like >an awful lot of overhead to avoid writing a couple of calls to free(). Well, your description of the thing you wish to avoid pretty much fits the way malloc() usually works. But the real problem is that to make those calls to free() you must unwind the stack under all conditions. If the memory is released like automatic variables, you can longjmp() out of a signal handler or a lower level function and get back to a known condition. Les Mikesell