"Jeremy Neal Kelly" <[EMAIL PROTECTED]> wrote in message
news:76276@palm-dev-forum...
>
> I've got a medium-sized multi-segment C++ app that is nearing
completion.
> Unfortunately, the CodeWarrior 8.1 linker suddenly complains that my
'Near
> data segment is bigger than 64K', and I'm stuck.
>
> If I understand correctly, the near data segment stores all my global
> variables, including exception and virtual tables. Strangely, though,
I
> first noticed this problem when trying to move variables out of global
scope
> and into functions. I gave up on that, but then had to add a try /
catch
> block to one of my routines; the problem returned. The data in all my
> segments, as reported by the segments tab in the CodeWarrior project
window,
> totals less than 3K. I know this doesn't count all my data usage, but
it
> still seems pretty low.

The data column doesn't count C++ exception tables, and I'm not sure if
it counts virtual function tables.  You can get an idea of what is
generated by each source file using the "disassemble" command.

The final result can be seen in the link map.  Go to the 68K Linker
panel to turn this on, then inspect it to find out your real data count.

> So: it occurred to me that vtables and such might be using up some of
the
> near data space. I tried changing my app to expanded mode, but the
> CodeWarrior IDE crashes every time I reach the linking stage (the
details of
> this problem will be posted in a separate thread: 'Expanded Mode Kills
> CodeWarrior IDE'). Should I pursue this? Is expanded mode a likely
solution
> to this problem?

Expanded mode should work for this.  I've posted against your other
message about the crash.

You should read my white paper at
http://www.metrowerks.com/products/palm/?whitepapers -- it explains a
lot of details.  My presentation from PalmSource 2002 should be online
at www.palmsource.com soon too.



-- 
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