At 02:28 PM 9/26/2002 -0400, you wrote:
>CodeWarrior generated exception tables must fit in under 32K?
>
>Is this assertion true?

It is true for standard mode applications.

For expanded mode applications, the total table size must fit under 64K, 
and leave room in the expanded section for virtual tables and other 
compiler-generated data.  The expanded data section doesn't have the chunk 
of system data sitting in the middle of the section that bifurcates the 
normal data section.

>After reading much of Ben's material and after looking at my CodeWarrior
>link maps, I've come to understand that the exception tables must live in
>the addressable range (32K) beneath the A5 register.  Also living beneath
>the A5 register is __segtable__, which takes up about 8K in my 450K app.
>This leaves me with about 24K for my exception tables.

Actually, with standard mode apps, the exception table could live in the 
32K above A5 as well, but 32K is the limit.

>Is it feasible to use this "zero-overhead" implementation of exceptions with
>a large (400K+) project?

It depends on how you use exceptions.  It can be a challenge when 
applications get large.

>In Ben's PalmSource PowePoint (available at www.palmoswerks.com) he mentions
>an expected 15:1 ratio from code size to exception table data.  I assume
>this is when efficiently using exception specifications on methods.  If my
>code is 450K, this would yield 30K of table data, and given the
>__segtable__, this probably won't fit beneath the A5 register.
>
>Has anyone done much better than 15:1?
>
>Please don't recommend that I just make my app smaller.  Reuse that comes
>from OO and good design is much more important to my companies needs.  We
>are using POL, MSL, and our own library that provides column-based table
>views and querries on PDBs.  Anyone think I can get exceptions to work for
>this beefy piece of OO on the Palm OS?

Expanded mode is the way to go, although its not a long-term 
fix.  Judicious use of exception specifiers can help some, although partial 
use may actually cause your application to grow.

POL 4 will support expanded mode, and that will ship as part of CodeWarrior 
for Palm OS V9 later this year.  I have some modifications to POL 3 that 
make it support expanded mode with V8; I've submitted them to TeT Co, and 
they may be able to make them available to you by contacting their support 
group.

-- Ben Combee, CodeWarrior for Palm OS technical lead


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

Reply via email to