Tom Lane wrote:
> Bruce Momjian <pgman@candle.pha.pa.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@candle.pha.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073