Code review for palloc0 patch --- avoid dangerous and unnecessary

Tom Lane <tgl@sss.pgh.pa.us>

Commit: 88177f77b17ef478da1dbca9acb5e3a61b346613
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2002-12-16T16:22:46Z
Releases: 7.4.1
Code review for palloc0 patch --- avoid dangerous and unnecessary
practice of evaluating MemSet's arguments multiple times, except for
the special case of newNode(), where we can assume the argument is
a constant sizeof() operator.
Also, add GetMemoryChunkContext() to mcxt.c's API, in preparation for
fixing recent GEQO breakage.

Files

PathChange+/−
src/backend/nodes/nodes.c modified +4 −9
src/backend/utils/mmgr/mcxt.c modified +61 −5
src/include/c.h modified +65 −25
src/include/nodes/nodes.h modified +11 −5
src/include/utils/memutils.h modified +2 −1
src/include/utils/palloc.h modified +17 −7