This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Implementing alloca with malloc
- From: Fergus Henderson <fjh at cs dot mu dot OZ dot AU>
- To: Stephen Biggs <xyzzy at hotpop dot com>
- Cc: GCC list <gcc at gcc dot gnu dot org>
- Date: Tue, 29 Jul 2003 01:13:22 +1000
- Subject: Re: Implementing alloca with malloc
- References: <1059386378.28784.5.camel@steve.softier.local>
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.