Just saw a fair amount of memset/memcpy in a profile, with the symbol
name indicating that the compiler assumes the data is unaligned.  After
pondering it for a few moments, that's not too surprising: Even if the
memory is allocated in the same place, the compiler has no way knowing
that palloc et al always return aligned memory.

Seems like a good idea to replace palloc et al with a macro that does
__builtin_assume_aligned(real_palloc(), 8) or such.


Andres Freund

Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:

Reply via email to