On Wed, Mar 06, 2024 at 11:39:13PM +0000, Carl Sturtivant via 
Digitalmars-d-learn wrote:
> I notice that a class with no data members has a size of two words (at
> 64 bits). Presumably there's a pointer to a table of virtual
> functions, and one more. Is the Vtable first?
[...]
> What is actually in these objects using that space?

In D, there's a pointer to the vtable and another pointer to a Monitor
object (used for synchronized methods).  There was talk about getting
rid of the Monitor field years ago, but nothing has happened yet.


T

-- 
MAS = Mana Ada Sistem?
  • Hidden members o... Carl Sturtivant via Digitalmars-d-learn
    • Re: Hidden ... H. S. Teoh via Digitalmars-d-learn
    • Re: Hidden ... Carl Sturtivant via Digitalmars-d-learn
      • Re: Hid... kinke via Digitalmars-d-learn
      • Re: Hid... Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn
        • Re:... cc via Digitalmars-d-learn
        • Re:... Carl Sturtivant via Digitalmars-d-learn

Reply via email to