Pickle
Mega GP Mania
Ive been working on a project that expects static arrays to be in sequential order in memory. A simple example would be something like this, but with much more data of course:
const char array1[] = { 0x01, 0x02, 0x3 };
const char array2[] = { 0x04, 0x05, 0x6 };
const char array3[] = { 0x07, 0x08, 0x9 };
What I found during debug is that the application would sometimes have padded zero's in between the arrays. Since the appication code works off the assumption the arrays are in memory one after the other the data would be offset.
The ideal solution im looking for is configuring gcc in a way that these are not padded. Does anyone know of any setting to control this? I have been searching but I havnt found anything that sounds like this.
const char array1[] = { 0x01, 0x02, 0x3 };
const char array2[] = { 0x04, 0x05, 0x6 };
const char array3[] = { 0x07, 0x08, 0x9 };
What I found during debug is that the application would sometimes have padded zero's in between the arrays. Since the appication code works off the assumption the arrays are in memory one after the other the data would be offset.
The ideal solution im looking for is configuring gcc in a way that these are not padded. Does anyone know of any setting to control this? I have been searching but I havnt found anything that sounds like this.