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
* use palloc0 in the newNode macro
The approach you are taking is messier *and* slower than this.
regards, tom lane