Tweak default memory context allocation policy so that a context is not
given any malloc block until something is first allocated in it; but thereafter, MemoryContextReset won't release that first malloc block. This preserves the quick-reset property of the original policy, without forcing 8K to be allocated to every context whether any of it is ever used or not. Also, remove some more no-longer-needed explicit freeing during ExecEndPlan.
Showing
- src/backend/commands/prepare.c 4 additions, 4 deletionssrc/backend/commands/prepare.c
- src/backend/commands/trigger.c 4 additions, 9 deletionssrc/backend/commands/trigger.c
- src/backend/executor/execJunk.c 1 addition, 35 deletionssrc/backend/executor/execJunk.c
- src/backend/executor/execMain.c 8 additions, 15 deletionssrc/backend/executor/execMain.c
- src/backend/executor/spi.c 4 additions, 4 deletionssrc/backend/executor/spi.c
- src/backend/utils/cache/relcache.c 10 additions, 10 deletionssrc/backend/utils/cache/relcache.c
- src/backend/utils/mmgr/aset.c 21 additions, 5 deletionssrc/backend/utils/mmgr/aset.c
- src/backend/utils/mmgr/mcxt.c 2 additions, 2 deletionssrc/backend/utils/mmgr/mcxt.c
- src/include/executor/executor.h 1 addition, 2 deletionssrc/include/executor/executor.h
- src/include/nodes/execnodes.h 1 addition, 11 deletionssrc/include/nodes/execnodes.h
- src/include/utils/memutils.h 10 additions, 2 deletionssrc/include/utils/memutils.h
Loading
Please register or sign in to comment