FORTRAN Reference Manual
Memory Organization
FORTRAN Reference Manual—528615-001
12-11
Extended Memory
entities that follow are located by indexing. Having one pointer for all scalars saves 
space in primary global storage, at some expense for additional processing time.
Extended Memory
An object program executing on an HP NonStop system always has exactly one user 
data segment of up to 65,536 words (addressable with 16-bit word addressing) and 
can also have any number of extended data segments of up to 127.5MB (addressable 
with 32-bit byte addressing). A FORTRAN program can directly access just one 
extended data segment.
The LARGECOMMON directive specifies which common blocks to allocate in the 
extended data segment. Common blocks are always statically allocated. Common 
blocks that are in the extended data segment have no pointers in the global area of the 
user data segment.
The LARGEDATA directive specifies which local data items to allocate in the extended 
data segment. “Data items” means variables, arrays, and RECORDs. “Local data 
items” means data items that are local to a program unit (they are not dummy 
arguments, not in a common block, and not equivalenced to anything in a common 
block). 
Local data items are statically allocated (they have a fixed memory location throughout 
program execution) if they are named in DATA or SAVE statements.
Otherwise, they are dynamically allocated on a run-time stack when their procedure is 
entered and de-allocated when that procedure returns to its caller.
Statically Allocated Data
Statically allocated local data items are contained in OWN data blocks. Each program 
unit can have zero, one, or two OWN data blocks. If a statically allocated local data 
item is in extended memory because of a LARGEDATA directive, it is in an OWN data 
block in the extended data segment; the block name is an ampersand (&) followed by 
the program unit name. Other statically allocated local data items are in an OWN block 
in the global area of the user data segment; the block name is a plus sign (+) followed 
by the program unit name.
Dynamically Allocated Data
Dynamically allocated local data items are in one of two run-time stack areas. If a 
dynamically allocated local data item is in extended memory because of a 
LARGEDATA directive, it is in the extended stack data block whose name is 
$EXTENDED#STACK. Other dynamically allocated local data items are in the local 
area of the run-time stack in the user data segment.
The hardware L and S registers point to the beginning and end of the currently 
executing procedure’s local area in the extended data segment run-time stack. Pointer 
doublewords in the global area of the user data segment serve a similar purpose. 










