Multiple segmenting is a good idea, if your code is approaching
58-64k in size. If you think you'll go over the 64k segment limitation,
then most definitely. Otherwise, my trick was to break up some
of the longer functions into shorter ones, move function calls that
are triggering the 16 bit reference up "higher" in the function (aka,
closer to the head of the function) if possible. Generally, just play
at moving things around and see what works without trashing your
logic.
Multiple segmenting might be your best option, however, since it
sounds like your app is a "continuous grower" (as a couple of mine
were) and will eventually reach that 64k limit sooner or later. Better
to take care of it sooner, trust me....it's no fun to have to add 5k of
data to your data segment when you're sitting around 60k, and have
to multisegment your app at the very last minute...it's not difficult, but
the first time you do it, it's always a bit confusing and requires some
thought as to how to break up your app.
-Rus
>All-
>
>I've been working on a project for a while, and today, I got the
>following link error: "SoundForm.cpp: 'CSoundForm::CSoundForm(unsigned
>short)' 16-bit code reference to 'PPalmForm::PPalmForm(unsigned short)'
>is out of range."
>
>From my mac development days, I remembered something about 32K segments,
>and since my project is now 56K, I assumed it was a segment problem.
>Sure enough, by simply rearranging moving CSoundForm and PPalmForm
>closer together, the error went away. (Incidentally, I could also
>create another segment, move one of the files there, and the problem
>also went away).
>
>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.
>
>Anybody have an opinion they would like to share?
>
>Thanks, Ted
>
>
>--
>For information on using the Palm Developer Forums, or to unsubscribe, please see
>http://www.palmos.com/dev/tech/support/forums/
Rus Daniel Nesse
Systems Developer
[EMAIL PROTECTED]
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/