64 #define MCXT_ALLOC_HUGE 0x01
65 #define MCXT_ALLOC_NO_OOM 0x02
66 #define MCXT_ALLOC_ZERO 0x04
75 Size size,
int flags);
81 extern void pfree(
void *pointer);
91 #define palloc0fast(sz) \
92 ( MemSetTest(0, sz) ? \
93 MemoryContextAllocZeroAligned(CurrentMemoryContext, sz) : \
94 MemoryContextAllocZero(CurrentMemoryContext, sz) )
127 extern char *
pstrdup(
const char *in);
130 extern char *
pchomp(
const char *in);
#define pg_attribute_printf(f, a)
static void const char * fmt
char * pnstrdup(const char *in, Size len)
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)
void * MemoryContextAllocZeroAligned(MemoryContext context, Size size)
char size_t pvsnprintf(char *buf, size_t len, const char *fmt, va_list args) pg_attribute_printf(3
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(void *pointer, Size size)
PGDLLIMPORT MemoryContext CurrentMemoryContext
struct MemoryContextCallback * next
MemoryContextCallbackFunction func