We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
There was an error while loading.Please reload this page.
1 parent2d69b46 commitc85a535Copy full SHA for c85a535
contrib/raftable/state.c
@@ -252,7 +252,7 @@ void state_shmem_request()
252
info.entrysize=sizeof(RaftableEntry);
253
info.dsize=info.max_dsize=hash_select_dirsize(RAFTABLE_HASH_SIZE);
254
flags=HASH_SHARED_MEM |HASH_ALLOC |HASH_DIRSIZE |HASH_ELEM;
255
-RequestAddinShmemSpace(RAFTABLE_BLOCK_MEM+sizeof(State)+hash_get_shared_size(&info,flags));
+RequestAddinShmemSpace(RAFTABLE_BLOCK_MEM+BUFFERALIGN(sizeof(State))+BUFFERALIGN(hash_get_shared_size(&info,flags)));
256
RequestNamedLWLockTranche("raftable",1);
257
}
258
@@ -267,7 +267,7 @@ StateP state_shmem_init()
267
268
state=ShmemInitStruct(
269
"raftable_state",
270
-RAFTABLE_BLOCK_MEM,
+sizeof(State),
271
&found
272
);
273
Assert(state);