At 10:04 AM 1/9/2001, Ted Lowery wrote:
>So my question is this: What considerations should I use for segmenting
>my application? Is is good enough to rearrange my files so calls are
>close together? Should I segment my app? If so, how should it be
>segmented? Shoudl I put all form files in the same segment? or should
>I put parts of the application that work together in the same segment?
>or maybe I should put all my base classes in the same segment, or maybe
>the palmos libs
You must be using the small memory model (as opposed to "smart" or large). With this
model, you have to live within the 32K limit, but you don't pay any space or speed
penalty. Unless arranging the files to avoid these link errors becomes a pain in the
neck, I'd stick with things as they are. If you find you're constantly rearranging
files to avoid link errors, you have two choices: switch to the "smart" code model or
break your code into two segments. The former is much easier, but will incur a larger
penalty for both space and speed. If you exceed the 64K per segment limit, of course
you have no choice but to use a second segment. When using multiple segments, jumps
between segments are slower than jumps within a segment, so arrange your code
accordingly. More importantly, some Palm application code has to be in the first
segment. Specifically, any code used to handle global find and other unusual launch
codes has to be in the first segment. Only normal launch (and goto launch with new
globals) can use code in later segments. This is one of the things that makes
multi-segment applications somewhat hard to do.
--
Peter Epstein
Palm Inc. Developer
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/