[label] DMSFREE DWORDS= n [, MIN= (0) [, [, ERR= [,TYPCALL=[i:{R]] where:
label
is any valid assembler language label. DWORDS= n l 1( is the number of doublewords of free storage requested. DWORDS=n
specifies the number of doublewords directly and DWORDS=(O) indicates
that register 0 contains the number of doublewords requested. Do not
specify any register other than register O. CMS returns, in register 0, the number of doublewords allocated and, in
register 1, the address of the first byte of allocated storage.
MIN= 5 n t l( 1 H indicates a variable request for free storage. If the exact number of
doublewords indicated by DWORDS operand is not available, then the
largest block of storage that is greater than or equal to the minimum is
requested. MIN =n specifies the minimum number of doublewords of free
storage directly while MIN = (1) indicates that the minimum is in register 1.
Do not specify any register other than register 1. TYPE=[USER ] NUCLEUS indicates the type of CMS storage with which this request for free storage
is filled: USER or NUCLEUS. 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 coding error or if there is no 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 abends.
AREA=[LOW ]
HIGH
indicates the area of CMS free storage from which this request for free
storage is filled. LOW indicates any free storage below the user areas,
Functional Information 325
depending on the storage requested. HIGH indicates DMSFREE storage
above the user area. If AREA is not specified, storage is allocated wherev­
er it is available.
TYPCALL=[SVC ]
BALR
indicates how control is passed to DMSFREE. Because DMSFREE is a
nucleus-resident routine, other nucleus-resident routines can branch direct­
ly to it (TYPCALL=BALR) while routines that are not nucleus-resident
must use linkage SVC (TYPCALL=SVC).
The FREELOWE pointer in NUCON indicates the amount of storage that
DMSFREE has allocated from the high portion of the user program area. These
pointers are initialized to the beginning of the loader tables.
The pointer FREEL OWE 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 is 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 returned, this pointer is adjusted upward and the freed
pages are released by issuing a DIAGNOSE X'10' to CPo The pointer FREEL 0 WE can never be lower than MAINHIGH, the "high extend" pointer for GETMAIN storage. If a DMSFREE request cannot be satisfied with­
out extending FREELOWE below MAINHIGH, then DMSFREE takes an error
exit, indicating that storage is insufficient to satisfy the request. Figure 35 on page 320 ,Figure 36 on page 321, and Figure 37 on page 322 show the relationship of
these storage areas.
The FREET AB free storage table is usually kept in nucleus low FREE storage.
However, the FREETAB may be located at the top of the user program area. This
table contains a code indicating the use of that page of virtual storage. The codes
in this table are as follows: USERCODE (X'Ol ') The page is assigned to user storage. NUCCODE (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 an unassigned page in the user program area. SYSCODE (X'05') The page is none of the above. The page is assigned to sys­
tem storage, system code, or the loader tables. Other DMSFREE storage pointers are maintained in the DMSFRT CSECT, in NUCON. The four chain header blocks are the most important fields in DMSFRT.
The four chains of unallocated elements are:
326 VM/SP System Programmer's Guide
The low storage nucleus chain
The low storage user chain
The high storage nucleus chain
The high storage user chain
Previous Page Next Page