On Mon, 28 Nov 2005, 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*)
You might try rearanging meaobj_record, puting the 8 byte items first and change integer to longint (8 bytes). Now it's 8+8+8+4+4 = 32 and there's no 4 byte pad hiding in there someplace. Russ