Storage allocated by means of the DftSFREE macro can be taken from several areas.
First, DMSFREE requests are allocated from the low-address free
storage area. If requests cannot be satisfied from there, they will be
satisfied from the user program area.
In addition, requests are further broken down between requests for
user storage and nucleus storage, as specified in the TYPE parameter of
the DMSFREE macro. These two types of storage are kept in separate 4K pages. It is possible, if there are no 4K pages completely free in lew
storage, for no storage of one type to be available in low storage,
while there is storage of the other type available there. GETMAIN FREE STORAGE MANAGEMENT POINTERS All GETMAIN storage is allocated in the user program area, starting from the end of the user's actual program. Allocation beqins at the location
pointed to by IUCOI pointer MAIISTRT. The location HAINHIGH in IUCON is
the pointer to the highest address of GETMAIN storage. When the STRINIT macro is executed, both MAINSTRT and MAINHIGH are
initialized to the end of the user's program, in the user progra. area.
As storage is allocated from the . user program area to satisfy GET MAIN 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 stcrage is released, this
pointer is adjusted downward.
The pointer MAINHIGH can never be higher than FREELOWE, the pointer
to the lowest address of DMSFREE storage allocated in the user program
area. If a GETMAIN request cannot be satisfied without extending MAINHIGH above FREELOWE, GETMAIN takes an error exit, indicating that
insufficient storage is available to satisfy the request.
The area between MAINSTRT and MAINHIGH may contain blocks 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 MAINLIST. The format of an element on the GETMAIN free element chain is as
follows:
<-------------- 4 bytes --------------) FREPTR -- pointer to next free 0(0) element in the chain, or 0 if there is no next element
FRELEN --length, in bytes, of
4(4) this element
Remainder of this free element 2-100 IBM VM/370 System Logic and Program Determination--Volume 2
DMSFREE FREE STORAGE POINTERS The pointers FREEUPPR and FREELOWE in NUCON indicate the amount of
storage which DMSFREE has allocated from the high portion of the user
program area. These pointers are initialized to the teginning of the
system loader tables.
The pointer FREELOVE is the pointer to the levest address of D8SPREE storage in the user program area, As storage is allocated fros the user
program area to satisfy D8SFREE requests, this pointer is adjusted
downward. Such adjustments are always in multiples of 4K, so that this
pointer is always on a 4K boundary. As the allocated storage is
released, this pointer is adjusted upward when whole 4K pages are
completely free.
The pointer FREELOVE can never be lower than ftAINHIGH, the pointer to
the highest address of GETHAIN storage. If a D5SFREE request cannot be satisfied without extending FREELOVE below 8AINHIGH, then D8SPBEE takes
an error exit, indicating that insufficient storage is available to
satisfy the request.
The FREETAB free storage table is kept in free storage, usually just
below the master file directory for the system disk. If there was no
space available there, then FREETAB was allocated from the top of the
user program areao This table contains one byte for each page ef
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: (1): If the page is assigned to user storage. If the page is assigned to nucleus storage. (J): If the page is part of the transient program area. If the page is part of the user program area. If the page is none of the above.
In these cases, the page is assigned to system storage, system code,
or the loader tables. Other DMSFREE storage pointers are maintained in the DMSFRT control
section, in NUCON. The most important fields there are the four chain
header blocks.
Four chains of elements are not allocated to be associated with DMSFREE storage: The low-storage nucleus chain, the low-storage user
chain, the high-storage nucleus chain, and the high-storage user chain.
For each of these chains, exists a control block consisting of four
words, with the following format: CMS Method of Operation and program organization 2-101
Previous Page Next Page