Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Community » U++ community news and announcements » Major Draw refactoring
Re: Major Draw refactoring [message #22474 is a reply to message #22469] Fri, 17 July 2009 23:54 Go to previous messageGo to previous message
Novo is currently offline  Novo
Messages: 1358
Registered: December 2006
Ultimate Contributor
luzr wrote on Fri, 17 July 2009 11:43

Novo wrote on Fri, 17 July 2009 11:24

luzr wrote on Fri, 17 July 2009 08:18



If yes, you can use dynamic_cast<DrawingDraw *>.




Is it really necessary to use RTTI with UPP? It makes code bigger and used only at very limited number of places in UPP. Avoiding RTTI (and exceptions) would attract small platform users.

Sorry for the offtopic.


RTTI is valid part of C++ standard and while minor feature, it has a nice ability to automatically provide solution to problems similiar to this one.

I do not believe that it makes code *significantly* bigger. There is not that much to store in memory in order to support RTTI (AFAIK).

Mirek


I couldn’t find a tool, which calculates size of RTTI info in an executable. Visually TheIDE has ~5% of overhead because of RTTI (you can see at least mangled names in data sections). This percentage depends on size of class’ names and complexity of templates. STL and BOOST would give much bigger overhead.

During research of this topic I found a very interesting article: http://connect.microsoft.com/VisualStudio/feedback/ViewFeedb ack.aspx?FeedbackID=471325

It looks like Visual C++ puts RTTI info into Read/Write segment. That doesn’t increase size of executable but increases run-time memory consumption. This explains why all windows applications require so much memory Wink.

Probably, MINGW is not that bad after all. Smile

TheIDE according to dumpbin:

  Summary

      142000 .data
      172000 .rdata
        1000 .rsrc
      257000 .text

SECTION HEADER #3
   .data name
  1412FC virtual size
  3CA000 virtual address (007CA000 to 0090B2FB)
   34000 size of raw data
  3CA000 file pointer to raw data (003CA000 to 003FDFFF)
       0 file pointer to relocation table
       0 file pointer to line numbers
       0 number of relocations
       0 number of line numbers
C0000040 flags
         Initialized Data
         Read Write

  Summary

      142000 .data



The ".data" segment is 13% of the ".text" segment. Not all ".data" is RTTI but still ...
And for some reason it requires 55% of ".text"'s size at run-time.

Any way, small device guys always compile with RTTI disabled.


Regards,
Novo
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message icon14.gif
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: sf.net tracker
Next Topic: U++ 1517 released
Goto Forum:
  


Current Time: Fri Apr 26 08:26:15 CEST 2024

Total time taken to generate the page: 0.05100 seconds