I'm very confused about segments.

If anyone has a suggestion about things to read to understand how
to properly create a segmented application in gcc, I'd love to
hear them.  If it's a book, and it talks a lot about whys and hows,
I'll buy it.

But in the meantime, I'll ask some questions here.

I have an app that compiles to about 66k.  I have literally gotten to
a point where in some places in the program if I add one more function
call, I start getting overflow errors.

At first, I thought these overflow errors were due to functions I had
written, but it turns out that isn't the case.

I can add a single call to FrmCustomAlert() and cause seven overflow
errors.

The app is already multi-segmented.  If I increase the segments from three
to seven, I can get fewer errors, but not eliminate them.  (Going to
ten segments does not decrease the number of errors.  In fact, it looks
like I could still have two segments, given the code size of the smallest
ones.)

Everything is in a single file (well, all of my functions are in a
single file), and all functions except Pilotmain() are declared, and
are declared as in a segment.  A pilot-file -l on the program shows
that the largest segment in just over 28000 bytes -- large, but well
under 32K.

How do I deal with the error on a library call like FrmCustomAlert() causing
an overflow error?  (Given how many calls to that function I have, it's not
likely I can contain them to a single segment.  I'd venture to say it is
impossible without *massive* rewriting of the program.)

Is there some rule I'm supposed to follow that I haven't mentioned and
may not be following?

Thanks,

Sean.

---
Sean L. Gilley
[EMAIL PROTECTED]
http://www.desert-penguin.com

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