My own favorite magic word is "objdump" (or "m68k-palmos-objdump", I suppose).
That way, I can see the actual differences between functions at the assembly
language level.

I think that one possible difference between C and C++ output might be in
embedded Macsbug names.  From the CVS submission notes in SourceForge:

* (In C++) we were pretty printing "int foo (int)" (which isn't
  a valid MacsBug name) instead of the mangled "foo__Fi".
  This was especially buggy for extern C functions.

I think (though I'm not sure about this) that John and I figured that the
correct thing to do would be to output merely "foo" as the embedded Macsbug
name, as you would get when using the C compiler. And even if we did figure that
this was the right thing to do, I'm not sure if John implemented it; he
indicated to me that there were problems getting the fully undecorated name.

-- Keith Rollin
-- Palm OS Emulator engineer






"Scott Johnson (Bellevue)" <[EMAIL PROTECTED]> on 12/26/2000 03:42:43 PM

Please respond to "Palm Developer Forum" <[EMAIL PROTECTED]>

Sent by:  "Scott Johnson (Bellevue)" <[EMAIL PROTECTED]>


To:   "Palm Developer Forum" <[EMAIL PROTECTED]>
cc:    (Keith Rollin/US/PALM)
Subject:  RE: C++ size bloat



> From: Joel Stanley [mailto:[EMAIL PROTECTED]]
> 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
> my code bloat amount seems to be about 17K or so.

Magic words: MAP FILE.  Look in the linker map file to see what's going on.
This will tell you if your individual functions all got bigger, or if a lot
of runtime support code is getting linked, etc.  Compare "before" and
"after" versions of the file to see differences.

Without this level of detailed information, figuring this out (as you have
seen) is basically shooting in the dark.

-slj-




-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to