aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/utils')
-rw-r--r--src/backend/utils/mmgr/slab.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/backend/utils/mmgr/slab.c b/src/backend/utils/mmgr/slab.c
index 0fcfcb4c786..e59154ddda4 100644
--- a/src/backend/utils/mmgr/slab.c
+++ b/src/backend/utils/mmgr/slab.c
@@ -194,9 +194,9 @@ SlabContextCreate(MemoryContext parent,
MAXALIGN(sizeof(SlabChunk)),
"padding calculation in SlabChunk is wrong");
- /* otherwise the linked list inside freed chunk isn't guaranteed to fit */
- StaticAssertStmt(MAXIMUM_ALIGNOF >= sizeof(int),
- "MAXALIGN too small to fit int32");
+ /* Make sure the linked list node fits inside a freed chunk */
+ if (chunkSize < sizeof(int))
+ chunkSize = sizeof(int);
/* chunk, including SLAB header (both addresses nicely aligned) */
fullChunkSize = MAXALIGN(sizeof(SlabChunk) + MAXALIGN(chunkSize));