vanam srihari kumar wrote:
Dear All
Thanks for your cooperation.
Again I am clearly explaining what my problem is.
I have records like below
PASTimeTag = RECORD high : INTEGER; low : INTEGER; END;
meaobj_record = RECORD next : meaobj_pointer; prev : meaobj_pointer; status : INTEGER; timetag : PASTimeTag; value : REAL; END;
meaobj_pointer = ^meaobj_record;
If I print the size of the records using sizeof functions I am getting below results.
sizeof(PASTimeTag) = 8 bytes (*which is correct bcoz INTEGER occupies 4 bytes )
sizeof(meaobj_record) = 32 bytes (*Actually it should be 28 bytes(meaobj_pointer=4+meaobj_pointer=4+ INTEGER=4+PASTimeTag=8+REAL=8)but it is allocating 32 bytes which is multiple of 8 near to 28*)
I think you should first read a basic tutorial on data alignment, e.g. http://en.wikipedia.org/wiki/Data_Structure_Alignment.
Regards,
Adriaan van Os