Commit 215a1c88 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Ensure that smp_object always are a multiple of 8 bytes.

parent 380c9351
......@@ -145,6 +145,7 @@ struct smp_segptr {
struct smp_object {
uint8_t hash[32]; /* really: DIGEST_LEN */
struct exp exp;
uint32_t __filler__; /* -> align/8 on 32bit */
double ban;
uint64_t ptr; /* rel to silo */
};
......
......@@ -136,6 +136,10 @@ smp_mgt_init(struct stevedore *parent, int ac, char * const *av)
ASSERT_MGT();
AZ(av[ac]);
/* Necessary alignment. See also smp_object::__filler__ */
assert(sizeof(struct smp_object) % 8 == 0);
#define SIZOF(foo) fprintf(stderr, \
"sizeof(%s) = %zu = 0x%zx\n", #foo, sizeof(foo), sizeof(foo));
SIZOF(struct smp_ident);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment