structure padding

Dag-ErlingSmørgrav des at des.no
Thu Jan 8 14:03:24 PST 2004


John Baldwin <jhb at FreeBSD.org> writes:
> Actually, why not just use a long for the e_sid instead of pid_t?

I got off my fat lazy butt and wrote the following:

#include <stdio.h>

struct foo { int a; long b; };
struct bar { long a[2]; };

int
main(void)
{
        printf("%lu, %lu\n", sizeof(struct foo), sizeof(struct bar));
        return (0);
}

On Alpha (-CURRENT, though, not -STABLE) it prints 16 for both
structures, so it looks like I don't need any hack at all.

DES
-- 
Dag-Erling Smørgrav - des at des.no


More information about the freebsd-alpha mailing list