Page of GC20-1807-7 As Updated April 1, 1981 by TNL GN25-0829 DMSFREE FREE STORAGE MANAGEMENT
The DMSFREE macro allocates CMS free storage. The format of the DMSFREE macro is: r r label] DMSFREE r , DWORDS= { n } I, MIN= { n } I (0) I (1) I L .J r r "r .. " II I,ERR=lladdrl I I NUCLEUS I I I I * I I L L .J.J L L J.J r r" I ,AREA= ILOW II I IHIGHII L L.J.J r .." I I I BALRII L L.J.J L- __ _
label
is any valid assembler language label. DW ORDS={ n } (0) MIN= { n }
(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 in register 1, the address of the first byte of
allocated storage.
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. KIN=n specifies the
minimum number of doublewords of free storage directly while
MIN=(1) indicates that the minimum is in register 1. tio not
specify any register other than register 1.
r , TY PE= I I INUCLEUSI L J
indicates the type of CMS storage with which this request for
free storage is filled: USER or NUCLEUS. r ,
ER R= Iladdr I I * I L J is--·t--h--e ---r.e-turnad-d·r-ess- i·f a-uJ- occUrs. "l-addr-'-' is 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 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 Part 3. Conversational Konitor System (CMS) 247
Page of GC20-1807-7 As Updated April 1, 1981 by TNL GN2S-0829
return. There is no default for this operand. If it is
omitted and an error occurs, the system will abend. r , AREA=ILOW I tHIGHI 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 uset program area
and the CMS loader tables. If AREA is not specified, storage
is allocated wherever it is available. r , TY PCALL= I I I BALRI L J
indicates how control is passed to DMSFREE. Because DMSFREE is a nucleus-resident routine, other nucleus-resident routines
can branch directly to it 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 beginning of the
loader tables.
The pointer FREELOWE is the "low extend" pointer of DMSFREE storage
in the crser 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 FREELOWE can never be lower than MAINHIGH, the "high
extend" pointer for GETMAIN storage. If a DMSFREE request cannot be
satisfied without extending FREELOWE below MAINHIGH, then DMSFREE will
take an error exit, indicating that storage is insufficient to satisfy
the Figure 27 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 virtcral storage. The codes in this table are as follows: USER COD E ( X ' 0 1 ' ) 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. US ARCODE (X'04') The page is part of the user prog ram area. SYSCODE (X'OS') The page is none of the above. The page is assigned
to system storage, system code, or the loader
tables.
248 IBM VM/370 System Programmer's Guide
Previous Page Next Page