TAL Reference Manual

Compiler Directives
TAL Reference Manual526371-001
16-57
LARGESTACK Directive
LARGESTACK Directive
LARGESTACK sets the size of the extended stack in the automatic extended data
segment.
num-pages
is the number of 2048-byte memory pages to allocate for the extended stack.
Specify an unsigned decimal constant in the range 0 through 32,767. The default is
the maximum extended stack space required by any single procedure or 64K
bytes, whichever is greater.
Usage Considerations
LARGESTACK can appear in the compilation command or anywhere in the source
code. The last instance of LARGESTACK sets the extended stack size.
If you compile several files separately and then bind them to produce a new object file,
Binder chooses the extended stack size as follows:
On a D-series system, Binder chooses the extended stack size provided by the
object file that contains the MAIN procedure.
On a C-series system, Binder chooses the largest extended stack size provided
among the object files.
After compilation, you can set the extended stack size by using the SET
LARGESTACK command of Binder. The block name of the extended stack is
$EXTENDED#STACK.
Example of LARGESTACK Directives
This example sets the size of the extended stack to 128 memory pages:
PROC last_proc;
BEGIN
!Lots of code
END;
?LARGESTACK 128
VST1635.vsd
num-pages
LARGESTACK
=