Re: [HACKERS] Re: alloca (was: Postgres Speed or lack thereof) - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: [HACKERS] Re: alloca (was: Postgres Speed or lack thereof)
Date
Msg-id 199901250610.BAA11990@candle.pha.pa.us
Whole thread Raw
In response to Re: alloca (was: Postgres Speed or lack thereof)  (The Hermit Hacker <scrappy@hub.org>)
Responses Re: [HACKERS] Re: alloca (was: Postgres Speed or lack thereof)
List pgsql-hackers
> On Sun, 24 Jan 1999, Goran Thyni wrote:
> 
> > The Hermit Hacker wrote:
> > > BUGS
> > >      The alloca() function is machine dependent; its use is discouraged.
> > 
> > Gain a big potential speed boost, loose some portability.
> > I think most modern unices has a good alloca, DOS and Mac
> > don't, but who's porting the server there?
> > 
> > Any unices out there missing alloca?
> 
> Make you a deal...
> 
> You build the code such that "#ifdef HAVE_ALLOCA" is true, so that those
> platforms that either don't support it, or have broken suport for it,
> aren't affect, and you are most welcome to work on it...

As far as I know, alloca is only useful for memory that is used by the
current function or its children.  I don't think we have many cases
where we could use that.

--  Bruce Momjian                        |  http://www.op.net/~candle maillist@candle.pha.pa.us            |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


pgsql-hackers by date:

Previous
From: The Hermit Hacker
Date:
Subject: Re: alloca (was: Postgres Speed or lack thereof)
Next
From: Tom Lane
Date:
Subject: Re: [HACKERS] Re: alloca (was: Postgres Speed or lack thereof)