[ First ] [ Previous ] [ Next ] [ Last ] [ Manuals ]
Pool Strings

The Pool Strings option in the C/C++ Language Panel affects how the compiler stores string constants
NOTE
In principle this option works for all targets. However, it is useful only for a Table of Contents based (TOC-based) linking mechanism such as that used for Mac OS on the PowerPC processor, or with Code Fragment Manager support on the 68K processor.
If this option is on, the compiler collects all string constants into a single data object so your program needs one TOC entry for all of them. Turning this option on decreases the number of TOC entries in your program but increases your program's size, because it uses a less efficient method to store the string's address.
If this option is off, the compiler creates a unique data object and TOC entry for each string constant.
TIP
You can change the size of the TOC with the Store Static Data in TOC option in the PPC Processor settings panel. For more information, see the Targeting Mac OS manual.
Turning this option on is especially useful if your program is large and has many string constants.
NOTE
If you turn the Pool Strings option on, the compiler ignores the setting of the PC-Relative Strings option. This is a 68K-only feature.
The Pool Strings option corresponds to the pragma pool_strings. To check whether this option is on, use __option (pool_strings). By default, this option is off.
See also "pool_strings" and "Checking Options."
[ First ] [ Previous ] [ Next ] [ Last ] [ Manuals ]
Visit the Metrowerks website at: http://www.metrowerks.com
For assistance contact Metrowerks Technical Support at: cw_support@metrowerks.com
Copyright © 2000, Metrowerks Corp. All rights reserved.
Last updated: August 17, 2000