RELATIVE EFFICIENCY OF REQUESTS The types of DMSFREE request in decreasing order of efficiency, are as
follows:
1. User fixed storage requests, any size. 2. Nucleus fixed storage requests, for small blocks (less than one
page in size).
3. Nucleus fixed storage request, for large blocks.
4. User variable storage requests.
efficient than fixed requests, if
can be allocated.)
(Variable requests are no less
the maximum block size requested
5. Fixed variable storaae requests. if the maxi.um block size
requested cannot be allocated. . RELEASING ALLOCATED STORAGE STORAGE ALLOCATED BY Storage allocated by the GET!II! macro released-In any of the following ways: A specific block of such storage may be released by means of the FREEMAIN macro instruction. The STRINIT macro instruction releases all storage allocated by any
previous GETftAIN requests. Almost all CMS commands call the STRINIT routine. Thus, executing almost any CMS command causes all GET!!IN storage to be released. STORAGE ALLOCATED BY DMSFREE: Storage allocated by the D!SPREE macro Instruction-may-be released-In either of the following ways: ! specific block of such storage May be released by .eans of DMSFRET macro instruction. Whenever any user routine or eMS DMSABN is entered), and the ABEND
invoked, all DMSFREE storage
automatically.
command abends (so that the routine
recovery facility of the syste. is
with TYPE=USER is released
Except in the case of ABEND recovery, storage allocated by the DftSFREE .acro is never released automatically by the system. Thus, storage
allocated by means of this macro instruction should always be released
explicitly by .eans of the DMSFRET macro instruction. . DMSFRE SERVICE ROUTINES The system uses the DMSFRES macro instruction to request certain free
storage management services. The options and their meanings are as
follows: INIT1--DMSINS calls this option to
initialization routine, to allow free
invoke the first free storage
storage requests to access the CMS Method of Operation and Program Organization 2-105
system disk. Before this routine is invcked, no free storage
requests .ay be made. If ter" this routine bas been invoked, free
storage requests may be made, but these are subject to the following
restraints until the second frce storage management initialization
routine has been invoked:
All requests for user storage are changed to requests for nucleus
storage. Only partial error checking is performed by the DMSFRET routine.
In particular, it is possible to release a block that was never
allocated.
All requests that are satisfied in high stcrage must be temporary,
because all high storage allocated is released when the second
free storage initialization routine is invoked.
When CP's saved system facility is used, the CMS system is saved
at the point just after the system disk has been accessed. This means that it is necessary for DMSFRE to be used before the Slze of
virtual storage is known, because the saved system can be used on any
size virtual machine. Thus, the first initialization routine
initializes DftSFRE so that limited functions can be requested, while
the second initialization routine performs the initialization
necessary to allow the full functions of DMSFRE to be requested. INIT2--This option is called by DMSINS to invoke the second
initialization routine. This routine is invoked after the size of
virtual storage is known, and it performs the initialization
necessary to allow all the functions of DMSFRE to be used. The
second initialization routine performs the following steps:
Releases all storage that has been allocated in the highstorage
area.
Allocates the FREETIB free storage table. This table contains one
byte for each 4096-byte page of virtual storage, and so cannot be
allocated until the size of virtual storage is known. It is
allocated in the low-address free storage area, if there is enough room available. If not, then it is allocated in the higher free
storage area. For a 256K virtual machine, FREETIB contains 64
bytes; for a 16 million byte machine, it contains 4096 bytes.
The FREETIB table is initialized, and all storage protection keys
are initialized.
All completely non-allocated 4K pages
chain are removed to the user chain.
up operations are performed.
on the nucleus free storage
Any other necessary cleaning CHECK--This option can be called at any time for system debugging
purposes. It invokes a routine that performs a thorough check of all
free storage chains for consistency and correctness. Thus, it checks
to see whether any free storage pointers have been destroyed. CKON--This option turns on a flag which causes the CHECK routine
described in the preceding paragraph to be invoked each time any call
is made to DftSFREE or DMSFRET. This can be useful to pinpoint a
problem that is, for example, destroying free storage management
pointers. Care should be taken when using this option# because the
CHECK routine is coded to be thorough rather than efficient.
2-106 IBM VM/370 System Logic and Program Determination--Volume 2
Previous Page Next Page