alloca (was Re: Are yacc parsers portable ?)

Rahul Dhesi dhesi at bsu-cs.UUCP
Thu Aug 4 06:11:52 AEST 1988


In article <62363 at sun.uucp> david at 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:  <backbones>!{iuvax,pur-ee,uunet}!bsu-cs!dhesi



More information about the Comp.lang.c mailing list