diff --git a/subject/main.c b/subject/main.c index 23f3e9d..b5081c9 100644 --- a/subject/main.c +++ b/subject/main.c @@ -25,6 +25,12 @@ static void print_layout() { printf(" tasks (struct list_head) : %2llu -> %2llu\n", 144, offsetof(struct task_struct, tasks)); printf(" stuck1 (int) : %2llu -> %2llu\n", 160, offsetof(struct task_struct, stuck1)); printf(" stuck2 (int) : %2llu -> %2llu\n", 166, offsetof(struct task_struct, stuck2)); + + printf("Current ArrayFun layout:\n"); + printf(" a (int) : %2llu -> %2llu\n", 0, offsetof(struct ArrayFun, a)); + printf(" b (int) : %2llu -> %2llu\n", 4, offsetof(struct ArrayFun, b)); + printf(" c (int) : %2llu -> %2llu\n", 8, offsetof(struct ArrayFun, c)); + printf(" d (double) : %2llu -> %2llu\n", 16, offsetof(struct ArrayFun, d)); } void arr_test() {