FORTRAN Reference Manual

Memory Organization
FORTRAN Reference Manual528615-001
12-12
Extended Memory
These pointers are in the data blocks named EXTENDED#STACK#FRAME and
EXTENDED#STACK#POINTERS.
The user data segment run-time stack cannot grow past address G[32767]. If a
program exceeds this limit, it is interrupted with a stack overflow trap, and the system
calls Debug or Inspect unless the ARMTRAP procedure has been called.
Whether you specify ENV OLD or ENV COMMON, your program always traps if it
overflows the run-time stack. Your program retains control only if you have defined
your own trap handler. If your program specifies ENV OLD, TACL writes a trap 3 error
message to your terminal. If your program specifies ENV COMMON, the FORTRAN
run-time library writes a message to your terminal specifying trap error 5.
Similarly, the extended data segment run-time stack cannot grow past the size
specified for it when the object program file is created. The compiler estimates the
proper size for this area. You can use the LARGESTACK compiler directive or the
Binder SET LARGESTACK command to override the value computed by the compiler.
If the program attempts to exceed this size limit, the FORTRAN run-time system
displays a message on the home terminal and calls the Guardian procedure ABEND if
your program specifies ENV OLD or PROCESS_STOP_ with the ABORT option set if
your program specifies ENV COMMON.
Figure 12-4 shows the allocation of space in the extended data segment. The pointers
shown here as LX, SX, and MX are contained in the two special data blocks mentioned
above.
Figure 12-4. Extended Data Segment
Common Blocks
specified in LARGECOMMON directives or as
a result of a LARGECOMMON directive
without parameters
End of extended
memory area
Local variables named in
DATA or SAVE statements
Note: Blocks are not necessarily allocated in
the physical order shown.
Dynamic Extended Stack Area
Beginning of extended
memory area
LX
SX
MX
VST1204.vsd