FORTRAN Reference Manual
FORTRAN Reference Manual—528615-001
12-1
12 Memory Organization
Topics covered in this section include:
The information in this section might be useful to you:
•
If you need to control where FORTRAN allocates data and data blocks
•
If you are using Inspect or Debug to debug a program
•
If you are combining FORTRAN programs written in languages other than 
FORTRAN
Code Space
The code area of a process consists of a user code space and an optional user library 
space. Each space can have up to 16 code segments of 64K words, or a total of up to 
1024K words in each of the two code spaces.
If an object program is executed with a user library, each code space is an object file 
containing up to 16 code segments. You run the object file that includes the main 
program (this file becomes the user code space), using the LIBRARY directive or the 
LIB run-time option to specify the object file that becomes the user library code space.
If a program is executed without a user library, the object file can have up to 32 code 
segments, for a total code size of up to 2048K words. The operating system allocates 
the first 16 code segments to the user code space and any remaining code segments 
to the user library space.
A program is said to use extended code space if it uses more than a one segment.
You don’t need to do anything special to write and compile programs that use extended 
code space. FORTRAN compiles the program units and calls Binder to combine them 
in a single object program. Binder produces an object program that uses as many code 
segments as needed, up to the limit of 32 segments.
Information in a code segment consists of instruction codes and program constants.
Your program can read the contents of a code segment but the TNS hardware reports 
an instruction trap if your program attempts to write to a code segment. Therefore, you 
cannot modify code segments during execution. 
A code segment consists of up to 65,536 16-bit words which are numbered 
consecutively from C[0] (code, element 0) through C[65535].
Topic Page
Code Space
12-1
Data Space 12-2
Debugging Programs That Use Extended Memory 12-13
TNS Processor Memory Organization 12-13










