8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3ec76ff commit 94884e1Copy full SHA for 94884e1
src/backend/utils/mmgr/slab.c
@@ -194,9 +194,9 @@ SlabContextCreate(MemoryContext parent,
194
MAXALIGN(sizeof(SlabChunk)),
195
"padding calculation in SlabChunk is wrong");
196
197
- /* otherwise the linked list inside freed chunk isn't guaranteed to fit */
198
- StaticAssertStmt(MAXIMUM_ALIGNOF >= sizeof(int),
199
- "MAXALIGN too small to fit int32");
+ /* Make sure the linked list node fits inside a freed chunk */
+ if (chunkSize < sizeof(int))
+ chunkSize = sizeof(int);
200
201
/* chunk, including SLAB header (both addresses nicely aligned) */
202
fullChunkSize = MAXALIGN(sizeof(SlabChunk) + MAXALIGN(chunkSize));
0 commit comments