🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.g++.help
Article #904

Multiple copies of Virtual Table

#904
From: Mike ODowd
Date: Thu, 15 Feb 1996 15:20
28 lines
1489 bytes
I have noticed that the size of my code has been growing
at an alarming rate recently. After some investigation, I
discovered that it is due to multiple copies of virtual tables.

It seems that each object file that accesses a class, ends up
with a copy of that class' virtual table. I one case, I counted 
91 object files that contain a copy of the same virtual table.

The virtual tables are taking up something like 25% of my code.

Please tell me that there is a way around this, that my code size
is not going to expand exponentially.

I am using gcc v2.6.0.



Thanks for any help
--------------------------
 Mike O'Dowd                  
 EMail: odowd@lightning.ch  
--------------------------


      [ Articles to moderate: mailto:c++-submit@netlab.cs.rpi.edu ]
      [  Read the C++ FAQ: http://www.connobj.com/cpp/cppfaq.htm  ]
      [  Moderation policy: http://www.connobj.com/cpp/guide.htm  ]
      [      Comments? mailto:c++-request@netlab.cs.rpi.edu       ]
Technical Details
Message-ID: <4fvj0l$ii7@netlab.cs.rpi.edu>
Path: arc1-ca.pugleaf.net!library.erc.clarkson.edu!rpi!not-for-mail

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!library.erc.clarkson.edu!rpi!not-for-mail
From: Mike ODowd <odowd@power5.rz.uni-hohenheim.de>
Newsgroups: gnu.g++.help,comp.lang.c++.moderated,comp.lang.c++
Subject: Multiple copies of Virtual Table
Date: 15 Feb 1996 15:20:53 -0000
Organization: Rechenzentrum Universitaet Hohenheim
Sender: cppmods@netlab.cs.rpi.edu
Approved: herbs@connobj.com
Message-ID: <4fvj0l$ii7@netlab.cs.rpi.edu>
NNTP-Posting-Host: netlab.cs.rpi.edu
X-Original-Date: 14 Feb 1996 16:29:34 GMT