Minor speed hacks in AllocSetReset: avoid clearing the freelist headers
authorTom Lane <tgl@sss.pgh.pa.us>
Sat, 14 May 2005 20:29:13 +0000 (20:29 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Sat, 14 May 2005 20:29:13 +0000 (20:29 +0000)
commit671cc146b8ac24b82b210f9626dceb172d950c84
treeb27a0fd0f47ece8f32f57ad3282476fd41044f43
parent12d355b37fc87e35feede4b2b271de65d32efc94
Minor speed hacks in AllocSetReset: avoid clearing the freelist headers
when the blocks list is empty (there can surely be no freelist items if
the context contains no memory), and use MemSetAligned not MemSet to
clear the headers (we assume alignof(pointer) >= alignof(int32)).
Per discussion with Atsushi Ogawa.  He proposes some further hacking
that I'm not yet sold on, but these two changes are unconditional wins
since there is no case in which they make things slower.
src/backend/utils/mmgr/aset.c