"Michal Seliga" <[EMAIL PROTECTED]> wrote in message
news:29654@palm-dev-forum...
>
> Hello
>
> Our project in C++ is quite large and now we run out of global variables
space. Codewarrior shows, that we use 45kB of data and MAP file generated by
linker
> shows that we use 32kB of data section below A5 and 18698 bytes above A5.
>
> We wanted to know where we take so much space, because most of all ours
global variables are shorts, ints, or pointers. I took all global variables
from one
> file (CodeWarrior shows 8805 bytes of data), put them into one structure
and made sizeof(struct ..). The result was 1096bytes.
One tool you can use is the IDE's "disassemble" command. Using the pref
panels, disable the code display so you can concentrate on data objects.
Then, disassemble different source files and see what they are contributing
to the global data section.
Having lots of constant strings is one things that can cause this -- moving
ones used in multiple files into resources can help. Also, large intialized
arrays can really eat up space.
--
Ben Combee
Veriprise Wireless <http://www.veriprise.com>
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/