1. Inline functions & macros irrespective of in which segment they are defined, do their code get added to the default segment (SEGMENT1)?
Macros get expanded inline whereever they are used. However, an inline function which is not inlined will be added to segment 1.
This behavior can be changed by altering the 68K Linker option "Merge compiler glue into segment 1". However, turning that off means that you may end up generating code in another segment that you'll need from a first segment call.
2. When the function definition is inside the class declaration, is it treated as an Inline function? Is that why these function code gets added to the default segment (SEGMENT1).
Yes. To not have an inline function, you need to define it outside the class declaration.
3. How to move the function code that are defined in the class to the segment where the source file containing the definition is present.
Define it out-of-line. -- Ben Combee, Senior Software Engineer, palmOne, Inc. "Combee on Palm OS" weblog: http://palmos.combee.net/ Developer Forum Archives: http://news.palmos.com/read/all_forums/ -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
