Autosizing Overview |
Virtual Machine |
This section provides a very high-level description PROIV’s use of memory. Only the main workspace is covered. There are several ancillary areas, which are used for a variety of different operations. This information may change between releases and is provided to enable the developer to set up Autosizing and understand certain ‘out of memory’ conditions.
This is the default mode of operation unless Autosizing is enabled. Each top level and Global Function currently running has a fixed size memory block known as a workspace. Each workspace is the same size. The size of a workspace determined by two in-built variables in the Virtual Machine.
The defaults can be changed by using the PROIV Virtual Machine Configurator. The sizes must be specified in bytes, and any attempt to use an illegal value or a value outside the allowed range, forces the default value to be used.
Note: The workspace size is the sum of the SPECAREA and DATABUFFERSIZE. The SPECAREA and DATABUFFER do constitute different parts of the workspace. However, the system can normally borrow from one area to use in the other. |
During a gen, part of the SPECAREA alone is used to assemble a list of Global Logic and ordinary logic names. This area is known as the Logic Stack. If this area overflows, the system generates an error 906 LOGIC STACK FULL DURING GEN message.
As far as genning and use of top level functions is concerned, the Traditional and Autosizing Models are the same. The difference relates to the running of Global Functions.
Autosizing allows Global Functions to obtain only the amount of memory they actually need to run, and not the full fixed size of the top level workspace. This also means that certain large functions which are 'gennable' in the top level workspace can request and obtain a memory area larger than the top level fixed size. The total memory saved is more significant if the functions are deeply nested because of the saving at each level of concurrent function call.
When a function gens, the PROIV Virtual Machine notes how much space is required to load the static areas of the function. Before loading, the VM notes this information and creates a suitably sized memory area. It is important to note that the function also requires dynamic or run-time memory which is held in a stack in the workspace. When Autosizing is enabled, the VM uses the user-supplied stack size, adds on a generous margin of error and adds this to the raw memory requirements passed through from the gen.
Note: The stack is used for Global Logic parameters and return addresses, LSCALL and CALL details etc. |
PROIV Workspace Management Overview provides an explanation of the PROIV Workspace.
PROIV Workspace Dimensions and Calculations contains details of the PROIV Workspace proportions, and also includes useful calculations.
Setting up Autosizing explains how to enable Autosizing.
DATABUFFERSIZE explains how to use the DATABUFFERSIZE environment variable.
SPECSIZE explains how to use the SPECSIZE environment variable.
Memory Management Error Messages contains details of the error messages that are related to memory management issues.
Topic ID: 700024