Hi folks,
I'm sure this is a topic that is frequently addressed. However, I was
unable to find a thread that dealt with the topic in enough detail.
I'm using prc-tools 2.0 under Linux.
I've taken an existing application in C and rewritten portions of it in
C++. I've tried not to be abusive, using only lightweight derivation, no
exception handling (in fact, I'm compiling with -fno-exceptions), and I'm
ignoring the STL and such completely (although I do have a single
templated (inline) function for doing generic ptr-casting from MemPtr to
whatever is needed.
Before the rewrite, the portion of the application under consideration was
~13K. After the rewrite, it's ~30K. I've tried fooling around with
different optimization options, etc, in a pathetic attempt to get the code
size down, but my code bloat amount seems to be about 17K or so.
Now my question is two-fold: first of all, how much of this is overhead
that I pay now and don't worry about anymore? I can imagine perhaps a few
K of bloat, but not an increase in size of more than double the
original. I'm basically attempting to discover if, when I convert the rest
of the code base into the hierarchy, I'll encounter the same kind of
bloat...
Secondly, how the hell can I reduce the size? Like I said before, I don't
think there are gross misuses of inheritance, and I'm not instantiating
multiple copies of classes either...
Thanks.
-j
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/