Can't you configure the alignment in the C compiler. I believe in the good
o'l TC days there was such an option . The con is that you get unoptimized
code which doesn't align in memory ( as mentioned by someone .. the word
boundary alignment in a 32 bit system ) and may not run as fast .. ( Was it
the memory model size .. large / medium / small ?? )
There is also a function that could perform this function .. The only
problem is that I've got DRAM .. Until the next refresh ..
Regards
Sandesh
----- Original Message -----
From: Kiran Jonnalagadda <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, January 18, 2000 6:07 PM
Subject: Re: [ILUG-BOM] Help with C variable alignment
> | struct head {
> | char Type[2]; /* 2 bytes */
> | long Size; /* 4 bytes */
> | short Reserved1; /* 2 bytes */
> | short Reserved2; /* 2 bytes */
> | long Bits; /* 4 bytes */
> | };
>
> [snip]
>
> | How can I force the compiler to not pad to word boundaries?
>
> I remember a "packed" keyword in Pascal. Not sure if the same exists in C
> too. It's been four years since I did any C programming.
>
>
> Kiran Jonnalagadda
> http://lunateks.com
>
>
> To subscribe / unsubscribe goto the site www.ilug-bom.org ., click on the
mailing list button and fill the appropriate information
> and submit. For any other queries contact the ML maintener
>
>
To subscribe / unsubscribe goto the site www.ilug-bom.org ., click on the mailing list
button and fill the appropriate information
and submit. For any other queries contact the ML maintener