We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8ba6fdf commit 376c216Copy full SHA for 376c216
src/backend/utils/mmgr/generation.c
@@ -271,8 +271,10 @@ GenerationContextCreate(MemoryContext parent,
271
* GenerationReset
272
* Frees all memory which is allocated in the given set.
273
*
274
- * The code simply frees all the blocks in the context - we don't keep any
275
- * keeper blocks or anything like that.
+ * The initial "keeper" block (which shares a malloc chunk with the context
+ * 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.
278
*/
279
void
280
GenerationReset(MemoryContext context)
0 commit comments