Path: utzoo!utgpu!attcan!uunet!husc6!cmcl2!nrl-cmf!mailrus!iuvax!bsu-cs!dhesi From: dhesi@bsu-cs.UUCP (Rahul Dhesi) Newsgroups: comp.lang.c Subject: Re: alloca (was Re: Are yacc parsers portable ?) Summary: ada could use alloca Message-ID: <3544@bsu-cs.UUCP> Date: 3 Aug 88 20:11:52 GMT References: <3950010@eecs.nwu.edu> <62170@sun.uucp> <62363@sun.uucp> Reply-To: dhesi@bsu-cs.UUCP (Rahul Dhesi) Organization: CS Dept, Ball St U, Muncie, Indiana Lines: 18 In article <62363@sun.uucp> david@sun.uucp (David DiGiacomo) writes: By distributing excellent software which makes good use of alloca, they [FSF] are ensuring that all self-respecting C compiler/library vendors will provide an efficient implementation of it. The original Rationale for the design of Ada implied that the usual mechanism for deallocating dynamically-allocated memory for a given pointer type would be the following: All allocated memory would be recovered when the block containing the definition of the pointer was exited. To help this, there was a pragma that allowed the programmer to specify how many units of memory would be needed for that pointer type. This sounds like exactly the type of thing alloca is good for. So I don't think the FSF people are doing something that nobody else thought was a good idea. -- Rahul Dhesi UUCP: !{iuvax,pur-ee,uunet}!bsu-cs!dhesi