mirror of
https://github.com/postgres/postgres.git
synced 2025-07-07 00:36:50 +03:00
Invent a new memory context primitive, MemoryContextSetParent.
This function will be useful for altering the lifespan of a context after creation (for example, by creating it under a transient context and later reparenting it to belong to a long-lived context). It costs almost no new code, since we can refactor what was there. Per my proposal of yesterday.
This commit is contained in:
@ -90,6 +90,8 @@ extern void MemoryContextDelete(MemoryContext context);
|
||||
extern void MemoryContextResetChildren(MemoryContext context);
|
||||
extern void MemoryContextDeleteChildren(MemoryContext context);
|
||||
extern void MemoryContextResetAndDeleteChildren(MemoryContext context);
|
||||
extern void MemoryContextSetParent(MemoryContext context,
|
||||
MemoryContext new_parent);
|
||||
extern Size GetMemoryChunkSpace(void *pointer);
|
||||
extern MemoryContext GetMemoryChunkContext(void *pointer);
|
||||
extern bool MemoryContextIsEmpty(MemoryContext context);
|
||||
|
Reference in New Issue
Block a user