Code review for palloc0 patch --- avoid dangerous and unnecessary
Tom Lane <tgl@sss.pgh.pa.us>
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
| Path | Change | +/− |
|---|---|---|
| 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 |