Provide a way to supress the "out of memory" error when allocating.
authorRobert Haas <rhaas@postgresql.org>
Fri, 30 Jan 2015 17:56:48 +0000 (12:56 -0500)
committerRobert Haas <rhaas@postgresql.org>
Fri, 30 Jan 2015 17:56:48 +0000 (12:56 -0500)
commitbd4e2fd97d3db84bd970d6051f775b7ff2af0e9d
tree661eb101e173451f8fe5a2ff7dd3dfac9165c01b
parent3d660d33aab2f1eb98367a84eb2addf3e0969c05
Provide a way to supress the "out of memory" error when allocating.

Using the new interface MemoryContextAllocExtended, callers can
specify MCXT_ALLOC_NO_OOM if they are prepared to handle a NULL
return value.

Michael Paquier, reviewed and somewhat revised by me.
src/backend/utils/mmgr/mcxt.c
src/include/utils/palloc.h