[ECOS] Byte array address alignement

Michael Anburaj embeddedeng@hotmail.com
Wed Oct 26 04:01:00 GMT 2005


Hi,

I have very general compiler question. Since, there are a lot of experts 
here, I am sure I will get an answer :)

I see that most compiler follow this alignment rule for byte arrays (I guess 
structures too), that they get aligned at least on a 4byte boundary on a 
32bit machine (like ARM or MIPS32 & so on).

I donÂ’t know if this alignment is an artifact of something else or the 
tool-chain has a rule as such for doing so.

Can anyone who is familiar with this, throw some light on this subject?
1.	I am curious to know if such a rule exists in C compilers?
2.	If so, what is it called? It will be great if you could point me to some 
matrial.

Thanks a lot,
-Mike.

Sample code:

Char C1;
Char C2[8];
Char C3;

&C1 is equal to 0x800001
&C2 is equal to 0x800004
&C3 is equal to 0x800002



-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss



More information about the Ecos-discuss mailing list