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
satisfiedfrom the user program area.
In addition, requests are further broken down between requests for
user storage and nucleus storage, as specified in theTYPE parameter of
theDMSFREE 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 byIUCOI pointer MAIISTRT. The location HAINHIGH in IUCON is
the pointer to the highest address ofGETMAIN storage. When the STRINIT macro is executed, both MAINSTRT and MAINHIGH are
initialized to theend of the user's program, in the user progra. area.
As storage is allocatedfrom 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 thanFREELOWE, the pointer
to the lowest address ofDMSFREE storage allocated in the user program
area. If aGETMAIN 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 betweenMAINSTRT 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 theNUCON 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 element2-100 IBM VM/370 System Logic and Program Determination--Volume 2
First,
storage area. If requests cannot be satisfied from there, they will be
satisfied
In addition, requests are further broken down between requests for
user storage and nucleus storage, as specified in the
the
storage, for no storage of one type to be available in low storage,
while there is storage of the other type available there.
pointed to by
the pointer to the highest address of
initialized to the
As storage is allocated
pointer is adjusted downward.
The pointer MAINHIGH can never be higher than
to the lowest address of
area. If a
insufficient storage is available to satisfy the request.
The area between
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
follows:
<--------------
FRELEN --length, in bytes, of
4(4) this element
Remainder of this free element