Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 376c216

Browse files
committed
Update comment, generation mem contexts have a "keeper" block
The keeper block was introduced in commit 1b0d9aa, but it forgot to update this comment.
1 parent 8ba6fdf commit 376c216

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/backend/utils/mmgr/generation.c

+4-2
Original file line numberDiff line numberDiff line change
@@ -271,8 +271,10 @@ GenerationContextCreate(MemoryContext parent,
271271
* GenerationReset
272272
* Frees all memory which is allocated in the given set.
273273
*
274-
* The code simply frees all the blocks in the context - we don't keep any
275-
* keeper blocks or anything like that.
274+
* The initial "keeper" block (which shares a malloc chunk with the context
275+
* header) is not given back to the operating system though. In this way, we
276+
* don't thrash malloc() when a context is repeatedly reset after small
277+
* allocations.
276278
*/
277279
void
278280
GenerationReset(MemoryContext context)

0 commit comments

Comments
 (0)