>"Nesse, Rustin" <[EMAIL PROTECTED]> wrote in message
>news:18645@palm-dev-forum...
>> Overall, just keep each segment under 32k and minimize inter-segment
>> jumps (calls to the other source files).
>
>You do want to minimize inter-segment jumps, but inter-file
>jumps within a
>segment aren't a problem. Having a separate .c file for each form is
>probably a good idea. It'll let you fine-tune your
>segmentation. Code that's
>used by launch codes that don't have access to globals needs
>to be in the
>first segment, so be sure to split this code out into separate
>.c files.
Oops! I meant to cut that paren'd part out before I sent it...I was
talking about something else and cut out the part that may have made
sense. It had to do more with organization than efficiency, though.
However, I don't see why it makes it that much better to have 10
.c files with forms that might only have one or two UI objects that
set global booleans, when you could just put those types into one
settings forms file. Perhaps for project management? I personally
like to put them all into one file, mostly because I have a puny
monitor and I hate having that many windows open at once.
>You can exceed 32K per segment. I recommend using the Small
>code model in CodeWarrior. As your segments gets bigger, it gets
>harder to arrange your files within each segment to avoid long jumps.
I always thought that it's a better idea to keep yourself under 32k
per segment if you can, but avoid the inter-seg jumps. That way, you
can avoid the out of reference errors and be able to keep your code
model Small. I think you could move lesser used functions over into
another segment, or maybe do a shared library type thing.
-Rus
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/