This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Implementing alloca with malloc


On 28-Jul-2003, Stephen Biggs <xyzzy@hotpop.com> wrote:
> GCC 3.2, I need to implement alloca in the back-end without messing with
> the stack. I see in the docs that I can probably use malloc with the
> expression for the var in the "allocate_stack" insn, no problem.  How do
> I then free it?

Have a look at the alloca() implementation in libiberty/alloca.c.
You can probably use that.

-- 
Fergus Henderson <fjh@cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]