16 #ifndef MEMUTILS_INTERNAL_H
17 #define MEMUTILS_INTERNAL_H
33 bool print_to_stderr);
34 #ifdef MEMORY_CONTEXT_CHECKING
50 bool print_to_stderr);
51 #ifdef MEMORY_CONTEXT_CHECKING
68 bool print_to_stderr);
69 #ifdef MEMORY_CONTEXT_CHECKING
93 bool print_to_stderr);
94 #ifdef MEMORY_CONTEXT_CHECKING
104 #define PallocAlignedExtraBytes(alignto) \
105 ((alignto) + (sizeof(MemoryChunk) - MAXIMUM_ALIGNOF))
145 #define MEMORY_CONTEXT_METHODID_BITS 4
146 #define MEMORY_CONTEXT_METHODID_MASK \
147 ((((uint64) 1) << MEMORY_CONTEXT_METHODID_BITS) - 1)
#define pg_attribute_noreturn()
void(* MemoryStatsPrintFunc)(MemoryContext context, void *passthru, const char *stats_string, bool print_to_stderr)
#define AllocHugeSizeIsValid(size)
#define AllocSizeIsValid(size)
void AllocSetReset(MemoryContext context)
void MemoryContextSizeFailure(MemoryContext context, Size size, int flags) pg_attribute_noreturn()
void * AllocSetRealloc(void *pointer, Size size, int flags)
static void MemoryContextCheckSize(MemoryContext context, Size size, int flags)
void BumpFree(void *pointer)
MemoryContext AlignedAllocGetChunkContext(void *pointer)
void * AlignedAllocRealloc(void *pointer, Size size, int flags)
void BumpDelete(MemoryContext context)
Size BumpGetChunkSpace(void *pointer)
void BumpStats(MemoryContext context, MemoryStatsPrintFunc printfunc, void *passthru, MemoryContextCounters *totals, bool print_to_stderr)
void MemoryContextCreate(MemoryContext node, NodeTag tag, MemoryContextMethodID method_id, MemoryContext parent, const char *name)
Size AllocSetGetChunkSpace(void *pointer)
void GenerationReset(MemoryContext context)
MemoryContext AllocSetGetChunkContext(void *pointer)
void * GenerationAlloc(MemoryContext context, Size size, int flags)
void AllocSetStats(MemoryContext context, MemoryStatsPrintFunc printfunc, void *passthru, MemoryContextCounters *totals, bool print_to_stderr)
void GenerationFree(void *pointer)
void * AllocSetAlloc(MemoryContext context, Size size, int flags)
MemoryContext GenerationGetChunkContext(void *pointer)
Size GenerationGetChunkSpace(void *pointer)
void * SlabAlloc(MemoryContext context, Size size, int flags)
MemoryContext BumpGetChunkContext(void *pointer)
void SlabFree(void *pointer)
void SlabReset(MemoryContext context)
void * BumpRealloc(void *pointer, Size size, int flags)
bool AllocSetIsEmpty(MemoryContext context)
Size SlabGetChunkSpace(void *pointer)
void * BumpAlloc(MemoryContext context, Size size, int flags)
void BumpReset(MemoryContext context)
bool GenerationIsEmpty(MemoryContext context)
void * MemoryContextAllocationFailure(MemoryContext context, Size size, int flags)
void GenerationStats(MemoryContext context, MemoryStatsPrintFunc printfunc, void *passthru, MemoryContextCounters *totals, bool print_to_stderr)
void AllocSetFree(void *pointer)
bool SlabIsEmpty(MemoryContext context)
MemoryContext SlabGetChunkContext(void *pointer)
void AllocSetDelete(MemoryContext context)
bool BumpIsEmpty(MemoryContext context)
void * GenerationRealloc(void *pointer, Size size, int flags)
void SlabStats(MemoryContext context, MemoryStatsPrintFunc printfunc, void *passthru, MemoryContextCounters *totals, bool print_to_stderr)
@ MCTX_15_RESERVED_WIPEDMEM_ID
@ MCTX_1_RESERVED_GLIBC_ID
@ MCTX_0_RESERVED_UNUSEDMEM_ID
@ MCTX_2_RESERVED_GLIBC_ID
@ MCTX_ALIGNED_REDIRECT_ID
void SlabDelete(MemoryContext context)
Size AlignedAllocGetChunkSpace(void *pointer)
void GenerationDelete(MemoryContext context)
void AlignedAllocFree(void *pointer)
void * SlabRealloc(void *pointer, Size size, int flags)
static pg_noinline void Size size