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 the NUCON pointer 8AINSTRT. The location
MAINHIGH in NUCON is the "high extend" pointer for GETMAIN storage.
Before issuing any GETM!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 the STRINIT 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 the STRINIT 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 is TYPCALL=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 satisfy GETMAIN requests, the MAINHIGH pointer is adjusted upward. Such adjustments
are always in multiples of doublewords, so that this pointer is always
on a doubleword boundary. As the allocated storage is released, the MAINHIGH pointer is adjusted downward.
The pointer MAINHIGH can never be higher than FREELOWE, the "low extend" pointer for DMSFREE storage allocated in the user program area.
If a GETMAIN 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 between MAINSTRT 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 the NUCON location MAINS!RT. Refer to Figure 21
for a description of CMS virtual storage usage. 244 IBM VM/370 System Programmer's Guide
VIRTUAL STORAGE DMSFREE requests when
no more low available FREELOWE
Unused portion of User
T Program Area T MAINHIGH --t -------- 7v.:.. MAINSTRT ____ [ The User's Program
(program is loaded via the LOAD commandl __________________ CMS Nucleus In "saved systems" this area
is a protected segment
(that is, all code must be
reentrant and cannot be
modified) Transient Program Area X'EOOO' Low Stor* DMSFREE Free Area DMSFREE requests are filled from
this area. The upper part of this
area contains the System Disk MFD followed by the FREETAB, if there is
enough room. DMSNUC and pointers.
has a storage key = X'E' fiqure 27. CM S Storaqe Map
April 1, 1981 CONTROL BLOCKS ! LORST I I I R I I BEJG X'2A40' X'29SO' X'235O' X'23OO' X'219O' X'1DDO'
X'1CCS' FVS X'1ADS' DIOSECT X'19ES' SVCSECT X'1748'
X'16BO'
X'1620'
X'1550' X'1200' X'DFO'
------------i X'2EO' Part 3. Conversational Monitor System (CMS) 245
Previous Page Next Page