DMSFREE FREE STORAGE MANAGEMENT The DMSFREE macro allocates CMS free storage. The format of the DMSFREE macro is:
[label]
label DMSFREE r , DiORDS={ n } I, MIN={ n }I (0) I (1), L J r r "r r " II I,ERR=lladdrl I INUCLEUSII 1 I * II I L L I r r" I II I I tHIGHl1 ILL JJ .JJ L L J.J r r" II I IBALRII L L JJ is any valid assembler language label.
----, DWORDS={ n } l (0) I!IN={ n }' (1)
is the number of doublewords of free storage requested. DiORDS=n specifies the number of doublewords directly and DWORDS=(O) indicates that register 0 contains the number of
doublewords requested.
indicates a variable request for free storage. If the exact
number of doublewords indicated by the DWORDS operand is not
available, then the largest block of storage that is greater
than or equal to the minimum is returned. MIN=n specifies the minimum number of double words of free storage directly while MIN=(1) indicates that the minimum is in register 1. The
actual amount of free storage allocated is returned to the
requestor via general register o. r , TYPE=IQSER I IBUCLEUSI L J indicates the type of CMS storage with which this request for
free storage is filled: USER or NUCLEUS. r ,
ERR=lladdri I * I L J is the return address if any error occurs. "laddr" is any
address that can be referred to in an LA (load address)
instruction. The error return is taken if there is a macro
ceding error or if there is not enough free storage available
to fill the request. If the asterisk (*) is specified for the
return address, the error return is the same as a normal
return. There is no default for this operand. If it is
omitted and an error occurs, the system will abend. CMS Introduction 2-17
r , AREA=,LOW I IHIGHI L J indicates the area of CMS free storage from which this request
for free storage is filled. LOW indicates the low storage
area between DMSNUC and the transient program area. HIGH
indicates the area of storage between the user program area
and the CMS loader tables. If AREA is not specified, storage
is allocated wherever it is available. r , I IBALRI L .I indicates how control is passed to DMSFREE. Since DMSFREE is
a nucleus-resident routine, other nucleus-resident routines
can branch directly to it (TYPCALL=BALR) while routines that
are not nucleus-resident must use linkage SVC (TYPCALL=SVC). The pointers FREEUPPR and FREELOWE in NUCON indicate the amount of
storage that DMSFREE has allocated from the high portion of the user
program area. These pointers are initialized to the teginning of the
loader tables.
The pointer FREELOVE is the "low extend" pointer of DMSFREE storage
in the user program area. As storage is allocated from the user program area to satisfy DMSFREE requests, this pointer will be adjusted
downward. Such adjustments are always in multiples of 4K bytes, so that
this pointer is always on a 4K boundary. As the allocated storage is
released, this pointer is adjusted upward.
The pointer FREELOVE can never be lower than ftIINHIGH, the "high extend" pointer for GETMAIN storage. If a DftSFREE request cannot be
satisfied without extending FREELOVE below MAINHIGH, then DMSFREE will
take an error exit, indicating that storage is insufficient to satisfy
the request. Figure 3 shows the relationship of these storage areas.
The FREETAB free storage table is kept in free storage, usually in
low storage, just below the Master File Directory for the System Disk
(S-disk). However, the FREETAB may be located at the top of the user
program area. This table contains one byte for each page of virtual
storage. Each such byte contains a code indicating the use of that page
of virtual storage. The codes in this table are as follows:
Code Mea!!!!!Sl USERCODE(X' 01') The page is assigned to user storage. lfUCCODE (X' 02' ) The page is assigned to nucleus storage. TRNCODE (X' 03' ) The page is part of the transient program area. USARCODE (X' 04' ) The page is part of the user program area. SYSCODE (X' 05 • ) The page is none of the above. The page is assigned
to system storage, system code, or the loader
tables. Other DMSFREE storage pointers are maintained in the DftSFRT CSlCT, in NUCON. The four chain header blocks are the most important fields in DMSFRT. The four chains of unallocated elements are:
2-18 IBM VM/370 System Logic and Program Determination--Volume 2
Previous Page Next Page