Hai folks,
I have a basic doubt about the memory allocated for a structure in Palm.I
declared following structure in my program. The size of elements in the
structure is 25 bytes. But when i tried to find size of whole structure
using sizeof(mystruct) its returning 26 bytes. I found that if single byte
char datatype is there in the structure this extra byte is comming. Some
where in the headers of palmos its mentioned that elements in a struct
follows 16 bit alignment. I am guessing that this interbyte/word alignment
issue. can anybody explain abit more on this.
Note: I found that on desktops(windows) this stucture size is correct. On
plam only its showing difference in size of struct.
typedef struct
{
Char c_Apln_no[10];
Char Dt_AplnDt[12];
char C_ChngApld;
UInt16 I_RegYear;
}Do_Apln;
Do_Apln mystruct
Thanks in adv
Narasimha Prasad
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/