GETMAIN FREE STORAGE MANAGEMENT All GETMAIN storage is allocated in the user program area, starting
after the end of the user's actual program. Allocation begins at the
location pointed to by theNUCON pointer 8AINSTRT. The location
MAINHIGH inNUCON is the "high extend" pointer for GETMAIN storage.
Before issuing anyGETM!IN macros, user programs must use the STRINI! macro to set up user free storage pointers. The STRINIT macro is issued
only once, preceding the initial GETMAIN request. The format of theSTRINIT macro is:
[label]I r r "1' STRINIT I II I I IBALRII ILL JJ r "1 I IBALRI L ..J indicates how control is passed to DMSSTG, the routine that
processes theSTRINIT macro. Since DMSSTG is a
nucleus-resident routine, other nucleus-resident routines can
branch directly to it (TYPCALL=BALR) while routines that are
not must use linkage SVC (TYPCALL=SVC). If no
operands are specified, the default isTYPCALL=SVC. When the STRINIT macro is executed, both MAINSTRT and MAINHIGH are
initialized to the end of the user's program, in the user program area.
As storage is allocated from the user program area to satisfyGETMAIN requests, the MAINHIGH pointer is adjusted upward. Such adjustments
arealways in multiples of doublewords, so that this pointer is always
on a doubleword boundary. As the allocated storage is released, theMAINHIGH pointer is adjusted downward.
The pointerMAINHIGH can never be higher than FREELOWE, the "low extend" pointer for DMSFREE storage allocated in the user program area.
If aGETMAIN request cannot be satisfied without extending MAINHIGH above FREELOWE, then GETMAIN will take an error exit, indicating that
insufficient storage is available to satisfy the request.
The area betweenMAINSTRT and MAINHIGH may contain tlocks of storage
that are not allocated and that are, therefore, available for allocation
by a GETMAIN instruction. These blocks are chained together, with the
first one pointed to by theNUCON location MAINS!RT. Refer to Figure 21
for a description ofCMS virtual storage usage. 244 IBM VM/370 System Programmer's Guide
after the end of the user's actual program. Allocation begins at the
location pointed to by the
MAINHIGH in
Before issuing any
only once, preceding the initial GETMAIN request. The format of the
[label]
processes the
nucleus-resident routine, other nucleus-resident routines can
branch directly to it (
not
operands are specified, the default is
initialized to the end of the user's program, in the user program area.
As storage is allocated from the user program area to satisfy
are
on a doubleword boundary. As the allocated storage is released, the
The pointer
If a
insufficient storage is available to satisfy the request.
The area between
that are not allocated and that are, therefore, available for allocation
by a GETMAIN instruction. These blocks are chained together, with the
first one pointed to by the
for a description of