interfaces ABI

Luís Marques luismarques at gmail.com
Mon Mar 19 09:38:17 PDT 2007


Hello,

The interfaces ABI is marked "TBD". Could this be filled, please?

I found the following surprising, regarding the ABI:

An object only has a pointer to the vtable and a monitor, the rest being 
the actual data ("non-static members"). At the vtable's offset 0 we find 
a pointer to the classinfo. And the classinfo has an array of 
interfaces. So when I add an interface, I would assume the objects to 
remain equal in size. The classinfo would get a bigger array of 
interfaces, and perhaps the vtable would also get bigger. But since no 
non-static member were added to the class, I expected the object size to 
be equal. Yet, it gets bigger.

--
Luís



More information about the Digitalmars-d mailing list