Re: [HACKERS] Re: alloca (was: Postgres Speed or lack thereof)

From: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
To: scrappy(at)hub(dot)org (The Hermit Hacker)
Cc: goran(at)kirra(dot)net, tgl(at)sss(dot)pgh(dot)pa(dot)us, vadim(at)krs(dot)ru, pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] Re: alloca (was: Postgres Speed or lack thereof)
Date: 1999-01-25 06:10:49
Message-ID: 199901250610.BAA11990@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 1999-01-25 06:46:22 Re: [HACKERS] Re: alloca (was: Postgres Speed or lack thereof)
Previous Message The Hermit Hacker 1999-01-25 05:38:54 Re: alloca (was: Postgres Speed or lack thereof)