aboutsummaryrefslogtreecommitdiff
path: root/src/include/utils/memutils.h
diff options
context:
space:
mode:
authorSimon Riggs <simon@2ndQuadrant.com>2017-11-23 05:45:07 +1100
committerSimon Riggs <simon@2ndQuadrant.com>2017-11-23 05:45:07 +1100
commita4ccc1cef5a04cc054af83bc4582a045d5232cb3 (patch)
tree897617e76a9777c039257312e2e4edcba1cbe4b7 /src/include/utils/memutils.h
parent3bae43ca4dc6c3123788044436521f1d33d9f930 (diff)
downloadpostgresql-a4ccc1cef5a04cc054af83bc4582a045d5232cb3.tar.gz
postgresql-a4ccc1cef5a04cc054af83bc4582a045d5232cb3.zip
Generational memory allocator
Add new style of memory allocator, known as Generational appropriate for use in cases where memory is allocated and then freed in roughly oldest first order (FIFO). Use new allocator for logical decoding’s reorderbuffer to significantly reduce memory usage and improve performance. Author: Tomas Vondra Reviewed-by: Simon Riggs
Diffstat (limited to 'src/include/utils/memutils.h')
-rw-r--r--src/include/utils/memutils.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/include/utils/memutils.h b/src/include/utils/memutils.h
index 869c59dc853..ff8e5d7d79b 100644
--- a/src/include/utils/memutils.h
+++ b/src/include/utils/memutils.h
@@ -155,6 +155,11 @@ extern MemoryContext SlabContextCreate(MemoryContext parent,
Size blockSize,
Size chunkSize);
+/* generation.c */
+extern MemoryContext GenerationContextCreate(MemoryContext parent,
+ const char *name,
+ Size blockSize);
+
/*
* Recommended default alloc parameters, suitable for "ordinary" contexts
* that might hold quite a lot of data.