From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org> |
Subject: | Re: MemSet inline for newNode |
Date: | 2002-11-11 16:40:02 |
Message-ID: | 200211111640.gABGe2U02117@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-patches |
Tom Lane wrote:
> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> > I still test the palloc pointer alignment in MemSetLoop because that is
> > not a constant.
>
> But it's known aligned when you just got it from palloc.
>
> Why don't you simply implement what was agreed to in the original
> thread, namely:
>
> * provide a MemSetAligned macro that is just like the standard
> one except it omits the pointer alignment test
>
> * provide a palloc0 macro that does MemSetAligned inside the
> macro; known safe because palloc returns a maxaligned pointer
I can't do MemSet in a macro that returns a value, as palloc requires.
MemSet has a loop, and that can't be done in a macro that returns a value.
--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
From | Date | Subject | |
---|---|---|---|
Next Message | Joe Conway | 2002-11-11 16:43:18 | Re: PQescapeBytea v 7.2.3 BUG? |
Previous Message | Tom Lane | 2002-11-11 16:23:44 | Re: MemSet inline for newNode |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2002-11-11 18:08:30 | Re: MemSet inline for newNode |
Previous Message | Tom Lane | 2002-11-11 16:23:44 | Re: MemSet inline for newNode |