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
The low storage nucleus chain The low stcrage user chain The high storage nucleus chain The high storage user chain
For each of these chains of unallocated elements, there is a control
block consisting of four words# with the following format: POINTER Nue MAX FLAGS I I POINTER -- pointer to the first
o (0) free ele.ent on the chain, or
zero, if the chain is empty. I I I Nue -- the number of elements on 4 (4) the 1. C ... al.R. I I I MAX -- a value equal to or greater I S (S) than the size of the largest I element. I I I I FLAGS- I SKEY - I TCODE -I Unused 1 12 (C) Flag I Storage IFREETAB 1 I byte I key I code I I I J I points to the first element on this chain of free elements.
If there are no elements on this free chain, then the POINTER field contains all zeros.
contains the number of elements on this
elements. If there are no elements on this
this field contains all zeros.
chain of free
free chain, then
is used to avoid searches that will fail. It contains a
number not exceeding the size, in bytes, of the largest
element on the free chain. Thus, a search for an element of a
given size will not be made if that size exceeds the elX field. this number may actually be larger than the
size of the largest free element on the chain.
The following flags are used:
FLCLN (X'SO') -- Clean-up flag. This flag is set if the chain
.ust be updated. This will be necessary in the following
circumstances: If one of the two high storage chains contains a 4K page to
which FREELOVE points, then that page can be re.oved fro.
the chain, and FREELOVE can be increased. All completely unallocated 4K pages are kept on the user
chain, by convention. Thus, if one of the nucleus chains
(low storage or high storage) contains a full page, then
this page must be transferred to the corresponding user
chain.
FLCLB (X'40') -- Destroyed flag. Set if the chain has been
destroyed.
FLHC (X'20') -- High storage chain.
and user high-storage chains.
Set for both the nucleus ces Introduction 2-19
Previous Page Next Page