Thursday, February 01, 2007

C++ Object Memory Layout

C++ Object Memory Layout in the presence of Virtual and/or (Multiple) Inheritance:
C++ ABI Summary
C++ Vtable Example
C++'s Virtual modifier
The Old New Thing on Adjustor Thunks
The Old New Thing on COM Object Layout
MSDN on Adjustor Thunks

The use of 'virtual' inheritance might change the binary layout of an object completely. In particular, the virtual base class may be moved to the end of the object layout rather than staying at the beginning of the object. Hence, DO NOT USE 'Virtual Inheritance' ON BINARY COMPATIBLE INTERFACES!

0 Comments:

Post a Comment

<< Home