mirror of
https://github.com/postgres/postgres.git
synced 2025-11-19 13:42:17 +03:00
Cleanup for pull-up-isReset patch.
Clear isReset before, not after, calling the context-specific alloc method, so as to preserve the option to do a tail call in MemoryContextAlloc (and also so this code isn't assuming that a failed alloc call won't have changed the context's state before failing). Fix missed direct invocation of reset method. Reformat a comment.
This commit is contained in:
@@ -128,11 +128,11 @@ typedef void *AllocPointer;
|
||||
/*
|
||||
* AllocSetContext is our standard implementation of MemoryContext.
|
||||
*
|
||||
* Note: header.isReset means there is nothing for AllocSetReset to do. This is
|
||||
* different from the aset being physically empty (empty blocks list) because
|
||||
* we may still have a keeper block. It's also different from the set being
|
||||
* logically empty, because we don't attempt to detect pfree'ing the last
|
||||
* active chunk.
|
||||
* Note: header.isReset means there is nothing for AllocSetReset to do.
|
||||
* This is different from the aset being physically empty (empty blocks list)
|
||||
* because we may still have a keeper block. It's also different from the set
|
||||
* being logically empty, because we don't attempt to detect pfree'ing the
|
||||
* last active chunk.
|
||||
*/
|
||||
typedef struct AllocSetContext
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user