C/C++ Programmer's Guide (G06.25+)
Compiler Pragmas
HP C/C++ Programmer’s Guide for NonStop Systems—429301-008
13-113
XMEM
XMEM
The XMEM pragma controls which memory model, large or small, the object file uses.
The XMEM pragma specifies the large-memory model. NOXMEM specifies the small-
memory model.
The pragma default settings are:
Usage Guidelines
•
The XMEM pragma can be entered on the compiler RUN command line or at the
start of the source text before any declarations or source code statements.
•
The native C and C++ compilers do not support the XMEM pragma. Native
compilers generate only programs that use the large-memory model.
•
The NOXMEM pragma cannot be used if the pragma SYSTYPE OSS is specified. The
compiler issues a warning.
•
The NOXMEM pragma compiles only under the 16-bit data model. The combination
of the WIDE and NOXMEM pragmas is diagnosed as an error.
•
All translation units of a program must specify the same memory model.
•
For more information about the two memory models, see Two Memory Models:
Large and Small on page 19-7.
•
The preprocessor variable __XMEM is defined when the XMEM pragma is in effect.
[NO]XMEM
SYSTYPE GUARDIAN SYSTYPE OSS
TNS C compiler XMEM XMEM
TNS c89 utility XMEM XMEM
G-series TNS c89 utility N.A N.A
TNS/R native C and C++ compilers N.A N.A
Native c89 utility N.A. N.A.