64 #define MCXT_ALLOC_HUGE 0x01
65 #define MCXT_ALLOC_NO_OOM 0x02
66 #define MCXT_ALLOC_ZERO 0x04
86 extern void pfree(
void *pointer);
95 #define palloc_object(type) ((type *) palloc(sizeof(type)))
96 #define palloc0_object(type) ((type *) palloc0(sizeof(type)))
101 #define palloc_array(type, count) ((type *) palloc(sizeof(type) * (count)))
102 #define palloc0_array(type, count) ((type *) palloc0(sizeof(type) * (count)))
108 #define repalloc_array(pointer, type, count) ((type *) repalloc(pointer, sizeof(type) * (count)))
109 #define repalloc0_array(pointer, type, oldcount, count) ((type *) repalloc0(pointer, sizeof(type) * (oldcount), sizeof(type) * (count)))
142 extern char *
pstrdup(
const char *in);
145 extern char *
pchomp(
const char *in);
#define pg_attribute_printf(f, a)
static void const char * fmt
char * pnstrdup(const char *in, Size len)
pg_nodiscard void * repalloc0(void *pointer, Size oldsize, Size size)
void * MemoryContextAllocAligned(MemoryContext context, Size size, Size alignto, int flags)
struct MemoryContextCallback MemoryContextCallback
char * pchomp(const char *in)
void MemoryContextRegisterResetCallback(MemoryContext context, MemoryContextCallback *cb)
static MemoryContext MemoryContextSwitchTo(MemoryContext context)
char * pstrdup(const char *in)
void pfree(void *pointer)
pg_nodiscard void * repalloc_huge(void *pointer, Size size)
void(* MemoryContextCallbackFunction)(void *arg)
void * palloc0(Size size)
void * MemoryContextAllocZero(MemoryContext context, Size size)
struct MemoryContextData * MemoryContext
void * MemoryContextAllocExtended(MemoryContext context, Size size, int flags)
void * palloc_extended(Size size, int flags)
void * MemoryContextAlloc(MemoryContext context, Size size)
char size_t pvsnprintf(char *buf, size_t len, const char *fmt, va_list args) pg_attribute_printf(3
void * palloc_aligned(Size size, Size alignto, int flags)
char * MemoryContextStrdup(MemoryContext context, const char *string)
char * psprintf(const char *fmt,...) pg_attribute_printf(1
void * MemoryContextAllocHuge(MemoryContext context, Size size)
pg_nodiscard void * repalloc_extended(void *pointer, Size size, int flags)
pg_nodiscard void * repalloc(void *pointer, Size size)
PGDLLIMPORT MemoryContext CurrentMemoryContext
static pg_noinline void Size size
struct MemoryContextCallback * next
MemoryContextCallbackFunction func