summaryrefslogtreecommitdiff
path: root/src/include/utils
diff options
context:
space:
mode:
authorFujii Masao2015-04-03 08:36:12 +0000
committerFujii Masao2015-04-03 08:36:12 +0000
commit8c8a886268dfa616193dadc98e44e0715f884614 (patch)
tree47caa3e9911b0362cf2e225df8f6e1b340af8f0d /src/include/utils
parentbc49d9324a464fce8f60e1bc14531631883021d4 (diff)
Add palloc_extended for frontend and backend.
This commit also adds pg_malloc_extended for frontend. These interfaces can be used to control at a lower level memory allocation using an interface similar to MemoryContextAllocExtended. For example, the callers can specify MCXT_ALLOC_NO_OOM if they want to suppress the "out of memory" error while allocating the memory and handle a NULL return value. Michael Paquier, reviewed by me.
Diffstat (limited to 'src/include/utils')
-rw-r--r--src/include/utils/palloc.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/include/utils/palloc.h b/src/include/utils/palloc.h
index 2cf51298331..9861f0dac73 100644
--- a/src/include/utils/palloc.h
+++ b/src/include/utils/palloc.h
@@ -76,6 +76,7 @@ extern void *MemoryContextAllocExtended(MemoryContext context,
extern void *palloc(Size size);
extern void *palloc0(Size size);
+extern void *palloc_extended(Size size, int flags);
extern void *repalloc(void *pointer, Size size);
extern void pfree(void *pointer);