I am interested in seeing the object layout structure, and am trying to use a disassembly in visual studio. Following is my code:
class myclass
{
public int m_a;
}
myclass myc = new myclass();
myc.m_a = 23;
//I am setting a breakpoint after this line
I opened Memory1 window, and type myc in the Address field. I get the following details int the output window (used Windows XP PC 32bit with Intel compiler):
0x0148B7BC 1c 93 a7 00 17 00 00 00 00 00 00 00 00 00 00 00 00 00 00
It appears that there is an additional pointer 00a7931c which is added in front of the object data, which increases the object size by 4 bytes. My confusion is that documentation says that object size is increase by 8 bytes due to header per object. Can someone please point me to where the other 4 bytes are?