Hello Everyone, I’m noticing a weird behavior in my Multi-Segment application. Even when the SEGMENT1 (main segment) has just a single small file that contains the entry point (PilotMain), the segment1 exceeds 64K.
I have a file TESTCODE2.cpp in SEGMENT2. The code segment size of this file is 97K. This CPP file has many class declarations. All the function definitions are placed inside the class declarations. When observing the Code warrior Link Map (.prc.map file), I observed that the code for all the functions that are defined inside the class in TESTCODE2.cpp (in SEGMENT2) are added in SEGMENT1. Because of this SEGMENT1 reaches more that 64K. When I tried defining few functions outside the class declaration, the segment 1 size decreased and the code goes into the segment where the source file containing the function definition is present. Even when the inline functions and macros are defined in files that are added to SEGMENT2, the code size are added to SEGMENT1. My Question: 1. Inline functions & macros irrespective of in which segment they are defined, do their code get added to the default segment (SEGMENT1)? 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). 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. Appreciate your time. With Regards Jefferson Samuel -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
