ILE C/C++ Compiler Reference
Specifies whether the created object can recognize and work with
addresses that reference teraspace storage locations.

TERASPACE Syntax:
|--+-------------------------------------------+----------------|
| .-*NO--------------------. |
| | .-*NOTSIFC-. | |
'-TERASPACE(--+---*YES----+----------+-+--)-'
'-*TSIFC---'
- *NO
- Default setting. The created object cannot recognize teraspace
storage addresses.
Note:
Starting in V6R1M0,
all modules are enabled to handle addressing of storage allocated
from teraspace. However, if *NO is specified, the compiler facilities
listed in the *YES description are not available.
- *YES
- The created object can handle teraspace storage
addresses, including parameters passed from other teraspace-enabled
programs and service programs. In addition, the following compiler
facilities are enabled:
- Pointers can be qualified with __ptr64 to allow creation of 8-byte
pointers used to access teraspace storage.
- The teraspace storage model can be specified with the STGMDL(*TERASPACE)
compiler option.
- The LLP64 data model can be specified with the DTAMDL(*LLP64)
compiler option or the #pragma datamodel(llp64) directive.
- Pointer difference arithmetic returns a signed long long result
instead of a ptrdiff_t result.
- *NOTSIFC
- The compiler does not use teraspace versions of storage functions,
such as malloc( ) or shmat( ). *NOTSIFC is the default if
TERASPACE(*YES) is specified.
- *TSIFC
- The compiler will use teraspace versions of storage
functions, such as malloc( ) or shmat( ), without requiring changes
to the program source code. The compiler defines the __TERASPACE__
macro, and maps certain storage function names to their teraspace-enabled
equivalents. For example, selecting this compiler option causes the
malloc( ) storage function to be mapped to _C_TS_malloc(
).
The DTAMDL (see page DTAMDL)
and STGMDL (see page STGMDL)
compiler options can be used together with the TERASPACE compiler
option. Valid combinations of these options are shown in the following
tables, along with the effects of selecting those combinations.
Table 4. Valid Combinations of DTAMDL, STGMDL, and TERASPACE Compiler Options
| DTAMDL(*P128) |
STGMDL |
| (*SNGLVL) |
(*TERASPACE) |
(*INHERIT) |
|
- Module/program is designed to use single-level store working storage.
- Generated code supports execution using:
- single-level store working storage
- single-level store dynamic storage
- Working storage can only be accessed using 16–byte space
pointers.
- Default pointer size is 16 bytes.
|
- Module/program is designed to use teraspace working storage.
- Generated code supports execution using:
- teraspace working storage
- single-level store dynamic storage
- teraspace dynamic storage
- Working storage can be accessed using either:
- process local pointers
- 16–byte space pointers
- Default pointer size is 16 bytes.
|
- Depending on the storage model of the calling program, the module
is designed to use either:
- single-level store working storage
- teraspace working storage
- Depending on the storage model of the calling program, generated
code supports execution using:
- single-level store working storage
- teraspace working storage
- single-level store dynamic storage
- teraspace dynamic storage
- Default pointer size is 16 bytes.
|
| TERASPACE(*NO) |
Default setting |
Invalid combination |
Invalid combination |
| TERASPACE(*YES *NOTSIFC) |
- Generated code also supports execution using teraspace
- Default is to use single-level store version of dynamic storage
interfaces.
|
- Default is to use single-level store version of dynamic storage
interfaces.
|
- Default is to use single-level store version of dynamic storage
interfaces.
|
| TERASPACE(*YES *TSIFC) |
- Generated code also supports execution using teraspace.
- Default is to use teraspace version of dynamic storage interfaces.
- __TERASPACE__ macro is defined.
|
- Default is to use teraspace version of dynamic storage interfaces.
- __TERASPACE__ macro is defined.
|
- Default is to use teraspace version of dynamic storage interfaces.
- __TERASPACE__ macro is defined.
|
| DTAMDL(*LLP64) |
STGMDL |
| (*SNGLVL) |
(*TERASPACE) |
(*INHERIT) |
|
- Module/program is designed to use single-level store working storage.
- Generated code supports execution using:
- single-level store working storage
- single-level store dynamic storage
- teraspace
- Working storage can only be accessed using 16–byte space
pointers.
- Default pointer size is 8 bytes.
|
- Module/program is designed to use teraspace working storage.
- Generated code supports execution using:
- teraspace working storage
- single-level store dynamic storage
- teraspace dynamic storage
- Working storage can be accessed using either:
- process local pointers
- 16–byte space pointers
- Default pointer size is 8 bytes.
|
- Depending on the storage model of the calling program, the module
is designed to use either:
- single-level store working storage
- teraspace working storage
- Depending on the storage model of the calling program, generated
code supports execution using:
- single-level store working storage
- teraspace working storage
- single-level store dynamic storage
- teraspace dynamic storage
- Working storage can be accessed using either:
- (conditionally) process local pointers
- 16–byte space pointers
- Default pointer size is 8 bytes.
|
| TERASPACE(*NO) |
Invalid combination |
Invalid combination |
Invalid combination |
| TERASPACE(*YES *NOTSIFC) |
- Default is to use single-level storage version of dynamic storage
interfaces.
- __LLP64_IFC__ macro is defined.
|
- Default is to use single-level storage version of dynamic storage
interfaces.
- __LLP64_IFC__ macro is defined.
|
- Default is to use single-level storage version of dynamic storage
interfaces.
- __LLP64_IFC__ macro is defined.
|
| TERASPACE(*YES *TSIFC) |
- Default is to use teraspace version of dynamic storage interfaces.
- __TERASPACE__ and __LLP64_IFC__ macros
are defined.
|
Recommended
settings for most effective use of teraspace
- Default is to use teraspace version of dynamic storage interfaces.
- __TERASPACE__ and __LLP64_IFC__ macros
are defined.
|
- Default is to use teraspace version of dynamic storage interfaces.
- __TERASPACE__ and __LLP64_IFC__ macros
are defined.
|
To make the most effective use of teraspace, you can specify the
following combination of options:
TERASPACE(*YES *TSIFC) STGMDL(*TERASPACE) DTAMDL(*LLP64)
For more information about teraspace storage, see Using Teraspace in
IBM® Rational® Developer for i: ILE C/C++ Programmer's Guide and Teraspace and single-level
store in ILE Concepts.
[ Top of Page | Previous Page | Next Page | Contents |
Index ]