Returns the buffer to free storage if the record was longer than 800 bytes. Returns to the caller.
Managing eMS Storage DMSFRE handles requests for CMS free storage. The sections of CMS storage have the following uses: DMSNUC (X'OOOOO' to approximately X'03000') - This is
constant area. It contains pointers, flags, and
maintained by the various system routines.
the nucleus
other data - LOw-core DMSFREE free storage area X'03000' to X'OEOOO') - This area is a free storage area, from which requests
from DMSFREE are allocated. The top part of this area contains the
file directory for the system disk (SSTAT). If there is enough room (as there will be in most cases), the FREETAB table also occupies
this area, just below the SSTAT. Transient program area (X' OEOOO' to X 110000 ') Because it is not
essential to keep all nucleus functions resident in storage all the
time, some of them are made "transient." This means that when they
are needed, they are loaded from the disk into the transient program
area. Such programs may not be longer than two pages, because that
is the size of the transient area.. (A page is 4096 bytes of virtual
storage. ) CMS nucleus (X'10000' to X'20000') - Segment 1 of storage contains
the reentrant code for the eMS nucleus routines. In shared CMS systems, this is the protected segment. That is, this segment must
consist only of reentrant code, and may not be modified under any
circumstances. This fact implies certain system restrictions for
functions which require that storage be mOdified, such as the fact
that DEBUG breakpoints or CP ADSTOP commands cannot te placed in this
segment, in a saved system. User program area (1'20000' to loader tableS) - User programs are
loaded into this area by the LOAD command. Storage allocated by means of the GETMAIN macro instruction is taken from this area,
starting from the high address of the user program. In addition,
this storage area can be allocated from the top down by DMSFREE, if
not enough storage is available in the low-core DMSFREE storage area.
Thus, the effective size of the user program area is reduced by the
amount of free storage which has been allocated from it by DMSFREE. Loader tables (top pages of storage) -The top of storage is occupied
by the loader tables, which are required by the CMS loader. These
tables indicate which modules are currently loaded in the user
program area (and the transient program area after a LOAD command).
The size of the loader tables can be varied by the SET LDRTBLS command. TYPES OF ALLOCATED FREE STORAGE Free storage can be allocated by means of the GETMAIN or DMSFREE macros. Storage allocated by means of the GETMAIN macro is taken fro. the
user program area, beginning with the high address of the user program. CMS Method of Operation and Program Organization 2-99
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
Previous Page Next Page