Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!asuvax!noao!ncar!elroy.jpl.nasa.gov!decwrl!llustig!objy!prefect!peter From: peter@prefect.Berkeley.EDU (Peter Moore) Newsgroups: comp.object Subject: Re: Shouldn't debuggers be able to debug dynamic objects? Message-ID: <1991Mar2.052423.3231@objy.com> Date: 2 Mar 91 05:24:23 GMT References: <1991Jan24.152256.24273@resam.dk> <1991Jan25.145947.16431@bellcore.bellcore.com> <1991Jan28.100213.1822@resam.dk> <1991Jan28.151241.25449@bellcore.bellcore.com> <40541@genrad.UUCP> <4578@m5.COM> Sender: news@objy.com Reply-To: peter@objy.com Distribution: comp Organization: Objectivity Inc. Lines: 30 In article <4578@m5.COM>, tma@m5.COM (Tim Atkins) writes: |> I fail to understand the phrase "minimal object overhead" regarding |> C++. Surely such can not be claimed in terms of space. If one cares |> about issues of polymorphism for a given set of classes then each instance |> will contain an overhead of at least a 4 byte virtual table pointer for |> every class in its inheritance hierarchy than defines virtual functions. You are mistaking features of one particular implementation of C++ with features of the language itself. Virtual tables (vtbls for short) ARE NOT PART OF THE LANGUAGE. They are merely one way of implementing the virtual function behavior of the language. Secondly, the particular implementation you are probably refering to, cfront from ATT, does NOT have a vtbl pointer for every super class that has virtual functions. In the single inheritance case, there is atmost one vtbl pointer no matter how many classes in the inheritance chain have virtual functions. Multiple inheritance is more complicated. |> Due to the way MI is implemented in relation to |> the implementation requirement that all superclass variables be contiquous, |> it is quite possible that there is duplication of entire substructures |> in the C++ instance. Again, this is NOT A CHARACTERISTIC of the langauge. The people at Tau Metric and Oregon Software would probably be glad to tell you about how their compiler doesn't make any redundant copies of base classes. Peter Moore