FORTRAN Reference Manual

Compiler Directives
FORTRAN Reference Manual528615-001
10-44
LARGESTACK Compiler Directive
LARGESTACK Compiler Directive
The LARGESTACK directive specifies the block size to reserve for dynamically
allocated variables specified in LARGEDATA directives.
number
is an unsigned decimal integer that specifies the number of memory pages to
allocate for dynamically allocated variables specified in LARGEDATA directives.
Considerations
The compiler calculates the block size to reserve for dynamically allocated
variables specified in LARGEDATA directives as the sum of the block sizes in all
the program units in the compilation.
The LARGESTACK directive overrides the compilers calculation.
You might need to use a LARGESTACK directive if your program uses recursion or
you use Binder to bind multiple object files together and you want to ensure that
the block size for dynamically allocated variables in the new object file created by
Binder is large enough for the executable program.
The LARGESTACK directive must appear on the FORTRAN command line
following the semicolon after the object file name, or in the source input file before
the first FORTRAN source statement.
If you specify a LARGESTACK directive after the first FORTRAN statement, the
compiler issues an error message and ignores the directive.
If you specify two or more properly placed LARGESTACK directives, the compiler
uses the first one, and issues a warning message for each of the others.
The Binder command SET LARGESTACK can also be used to set the extended
memory stack size for an object file.
Example
?LARGESTACK 512
LARGESTACK number