Hello,

I have a multi-segmented C++ app using 2-byte int lib and Smart code model.
After reading this thread, I was wondering if my app was paying a
performance penalty because of my segmentation method.

Why would a segment limited to a 64k boundary be more efficient by only
using 32k?  Would that not double the amount of segment jumping?  I was
under the impression that you should pack as much code into a segment as
possible to minimize segment swapping.  Does the number of segments even
matter?

Does the Profiler recommend which modules should share the same segment for
better performance or any other tool?

"Stringer" <[EMAIL PROTECTED]> wrote in message
news:51388@palm-dev-forum...
>
> >Subject: Re: 4-byte integers & an 11 segment application problem
> >From: "Miron Ophir" <[EMAIL PROTECTED]>
> >Date: Thu, 31 May 2001 15:25:52 +0200
>
> >>"Robert McKenzie" <[EMAIL PROTECTED]>
> >>
> >> the sizes reported in Codewarrior are the sizes of all functions
compiled
> >> for that segment, not the sizes of all functions linked into that
segment.
> >> To get the latter (the only one that matters) value, you need to look
at
> the
> >> map-file.  To get a mapfile, go to the target settings and tell
> codewarrior
> >> to make one for you.  I suspect you have a segment larger than 64K.
> >
>
> >Thanks Robert,
>
> <But if this is the case, how do you expect people to use the
> >Palm OS Runtime (4i)? Suppose we use enough functions to
> >cause the linker to linkage more than 64K, it will exceed the
> > allowed segment size. If the lib utself is more than 64K
> >we can't split it, so what's the remedy?
>
>
> You seem to be getting off track here.
>
> Using the runtime lib is not going to cause your first segment to be
> greater than 32KB, never mind 64KB.
> You just have too much of your application code in the first segment.
>
> As a rule of thumb, your base application module (that goes into the
> first segment) shouldn't be more than (say) 2KB to 4KB in size.
>
> Another recommendation from other threads, is that you keep the code
> size for each segment under 32KB, and use the "small" memory model.
>
> Roger Stringer
> Marietta Systems, Inc.
>
>
>



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