allocation alignment for global and local variables.
- From: "gamja" <assert@xxxxxxxxx>
- Date: 30 Sep 2005 04:30:00 -0700
Hi all.
I know that some padding bits are inserted between data members of a
structure. Is this rule also applied for the variables on local stack
or global??? For example, in following code dumps...
------------
struct foo foo1;
....
struct bar bar1;
....
char byte;
int dword;
int main(void)
{
}
--------------
Is it allowed to expect that each start address of foo1, bar1, byte and
dword are aligned 4bytes?
Does the C99 specification state any rules related with this problem?
Thanks in advance.
Best regards
GAMJA
.
- Follow-Ups:
- Re: allocation alignment for global and local variables.
- From: Eric Sosman
- Re: allocation alignment for global and local variables.
- From: "Nils O. Selåsdal"
- Re: allocation alignment for global and local variables.
- Prev by Date: Re: A[x][y][z]
- Next by Date: Re: offsetof
- Previous by thread: Universal (g)libc
- Next by thread: Re: allocation alignment for global and local variables.
- Index(es):
Relevant Pages
|