Jeff Ondich wrote:
I have an on-going problem with a C++ application that keeps overflowing
segment 1. To support system-wide search, I need to fit about 55KB of
code into segment 1. That's well under the 64KB limit, so that's great.
The problem is that a bunch of my code is in templates, and I can't
figure out how to specify which templated member functions need to be in
segment 1.
For example, suppose I have a class MyTemplate<T> with member functions
MyTemplate<T>::functionA and MyTemplate<T>::functionB. If I do this:
#pragma segment Segment1
template class MyTemplate<SomeClass>;
both MyTemplate<SomeClass>::functionA and
MyTemplate<SomeClass>::functionB go into Segment1. Is there any way for
me to put functionA in Segment1 and functionB in Segment2?
Thanks,
Jeff Ondich
Not sure if this will help you or not, but there is a 'hack' you can use
to allow handling of non-global launch codes span multiple segments.
In the 'Palm OS Runtime' project, you can call the __LoadAndRelocate__
function to set up the inter-segment jump tables, allowing you to put
your code in any segment you like. It is called automaticaly for you for
Normal launch, but with some work you can call it yourself for other
launch codes.
--
For information on using the PalmSource Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/