I'm doing some cell broadband engine programming, and I've come across a strange thing I can't explain, while investigating a segmentation fault, based on the following code:
struct SPU_DATA
{
unsigned char *i;
unsigned char *o;
unsigned int width;
unsigned int height;
unsigned int bpp;
char padding[108];
} __attribute__((aligned(128)));
When I output the size of this struct to the console on the ppu, the value 256 is output. However, when I output the size on an spu, it comes out as 128, which is what's expected.
I can't find a reason for this. Any ideas?