From 8c8a886268dfa616193dadc98e44e0715f884614 Mon Sep 17 00:00:00 2001 From: Fujii Masao Date: Fri, 3 Apr 2015 17:36:12 +0900 Subject: 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. --- src/include/utils/palloc.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/include/utils') 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); -- cgit v1.2.3