40 #define MaxAllocSize ((Size) 0x3fffffff)
42 #define AllocSizeIsValid(size) ((Size) (size) <= MaxAllocSize)
44 #define MaxAllocHugeSize ((Size) -1 >> 1)
46 #define AllocHugeSizeIsValid(size) ((Size) (size) <= MaxAllocHugeSize)
61 #ifdef MEMORY_CONTEXT_CHECKING
67 #define STANDARDCHUNKHEADERSIZE MAXALIGN(sizeof(StandardChunkHeader))
88 #define MemoryContextResetAndDeleteChildren(ctx) MemoryContextReset(ctx)
111 #ifdef MEMORY_CONTEXT_CHECKING
142 #define ALLOCSET_DEFAULT_MINSIZE 0
143 #define ALLOCSET_DEFAULT_INITSIZE (8 * 1024)
144 #define ALLOCSET_DEFAULT_MAXSIZE (8 * 1024 * 1024)
150 #define ALLOCSET_SMALL_MINSIZE 0
151 #define ALLOCSET_SMALL_INITSIZE (1 * 1024)
152 #define ALLOCSET_SMALL_MAXSIZE (8 * 1024)
160 #define ALLOCSET_SEPARATE_THRESHOLD 8192
void MemoryContextDelete(MemoryContext context)
PGDLLIMPORT MemoryContext CacheMemoryContext
bool MemoryContextIsEmpty(MemoryContext context)
void MemoryContextAllowInCriticalSection(MemoryContext context, bool allow)
MemoryContext GetMemoryChunkContext(void *pointer)
struct StandardChunkHeader StandardChunkHeader
void MemoryContextDeleteChildren(MemoryContext context)
void MemoryContextResetOnly(MemoryContext context)
void MemoryContextReset(MemoryContext context)
PGDLLIMPORT MemoryContext PortalContext
PGDLLIMPORT MemoryContext PostmasterContext
bool MemoryContextContains(MemoryContext context, void *pointer)
MemoryContext AllocSetContextCreate(MemoryContext parent, const char *name, Size minContextSize, Size initBlockSize, Size maxBlockSize)
void MemoryContextStats(MemoryContext context)
PGDLLIMPORT MemoryContext TopTransactionContext
PGDLLIMPORT MemoryContext MessageContext
MemoryContext MemoryContextGetParent(MemoryContext context)
Size GetMemoryChunkSpace(void *pointer)
void MemoryContextResetChildren(MemoryContext context)
PGDLLIMPORT MemoryContext CurTransactionContext
void MemoryContextStatsDetail(MemoryContext context, int max_children)
void MemoryContextSetParent(MemoryContext context, MemoryContext new_parent)
PGDLLIMPORT MemoryContext TopMemoryContext
PGDLLIMPORT MemoryContext ErrorContext
void MemoryContextInit(void)
MemoryContext MemoryContextCreate(NodeTag tag, Size size, MemoryContextMethods *methods, MemoryContext parent, const char *name)