gtpm6m0m | Main Supervisor Reference |
Main storage allocation for ECB-controlled programs is a dynamic process of getting and releasing virtual storage. All requests are processed through the storage management CSECT, CCSTOR.
There are two types of storage blocks: logical and physical. Logical blocks are carved from 4K frames. Common frames reside below 16MB and can be shared by application programs.
Application programs normally use logical block types, which include:
Block Type | Use |
---|---|
128-byte block | |
381-byte block |
Data records Message blocks |
1055-byte block |
Data records Message blocks |
4095-byte block |
Data records Keypoint records Program segments Message blocks |
The control program normally uses physical block types that include:
In each ECB virtual memory is a one-megabyte area of private storage, below 16MB, known as the ECB private area. Application programs can issue macros (such as GETCC, RELCC, FINWC, FILEC and EXITC) to get and return storage blocks in this area. This virtual storage is carved from 4K frames of main storage.
ECBs can also get contiguous (or heap) storage in the heap private area area above 16MB. Application programs can issue the CALOC, MALOC, REALLOC and FREEC macros (or the calloc, malloc, realloc and free C functions) to get and release storage in this area.
ECBs share a pool of working storage below 16MB called the common area. Application programs use the GETCC macro (with the COMMON=YES parameter) to get common blocks in this area.
The control program uses the following macros to get and release storage:
The control program uses the $CONBC and $DISBC macros to connect and disconnect blocks to and from an ECB virtual memory.
The working storage blocks for ECBs are allocated by CTIN and assigned by the OPZERO program and returned to the ECB pool by the EXIT routine (see Initializing ECBs via OPZERO and Returning ECBs after Entries Are Processed).
IOCBs and SWBs are for the exclusive use of the control program and reside in protected storage. All other blocks reside in unprotected storage.
In an online system, you can display the number of available main storage blocks with the ZSTAT command.
Block checking mode is a debugging tool that flags certain coding errors, such as writing beyond the end of a block, passing blocks chained to other blocks, and using storage that has already been released. When block checking mode is on:
You can turn block checking mode on and off with the ZSTRC command, without re-IPLing.