Hi,
i have the following code:
#include <stdio.h>
int
main(void)
{
float a[4] __attribute__((aligned(0x1000))) = {1.0, 2.0, 3.0, 4.0};
printf("%p %p %p %p\n", &a[0], &a[1], &a[2], &a[3]);
}
And i have the following output:
0x7fffbfcd2da0 0x7fffbfcd2da4 0x7fffbfcd2da8 0x7fffbfcd2dac
Why the address of a[0]
is not a multiple of 0x1000
?
What exactly __attribute__((aligned(x)))
does? I misunderstood this explanation?
I'm using gcc 4.1.2.
Thanks in advance.