April 1, 1981
RELEASING ALLOCATED STORAGE Storage allocated by the GETMAIN macro instruction may be released in
any of the following ways:
1. A specific block of such storage may be released by means of the
FREEMAIN macro instruction.
2. The STRINIT macro instruction releases
any previous GETMAIN requests.
all storage allocated by
3. Almost all CMS commands issue a STRINIT macro instruction. Thus,
executing almost any CMS command will cause all GETMAIN storage to
be released.
storage allocated by the DMSFREE macro instruction may be released in
any of the followinq ways:
1. A specific block of such storage may be released by means of the DMSFRET macro instruction.
2. Whenever any user routine or CMS command abnormally terminates (so
that the routine DMSABN is entered), and the abend recovery
facility of the system is invoked, all DMSFREE storage with TIPE=USER is released automatically.
Except in the case of abend recovery, storage allocated by the DMSFREE macro is never released automatically by the system. Thus,
storage allocated by means of this macro instruction should always be
released explicitly by means of the DMSFRET macro instruction. DMSFREE SERVICE ROUTINES The DMSFRES macro instruction is used by the system to request certain
free storage management services.
The format of the DMSFRES macro is: ,..---- I [label] I I I I I I I DMSFRES INIT1
INIT2
CHECK CKON CKOFF UREC CALOC r r" II I BALR II L L J.J
252 IBM VM/370 system Programmer's Guide
label INIT1 IBIT2
CHECK
is any valid Assembler language label.
invokes the first free storage initialization routine, so
that free storage requests can be made to access system disk. Before INIT1 is invoked, no free storage
requests may be made. After INIT1 has been invoked, free
storage requests may be made, but these are subject to
the following restraints until the second free storage
management initialization routine has been invoked: All requests for USER type storage are changed to
requests for NUCLEUS type storage. Error checking is limited before initialization is In particular, it is sometimes possible to
release a block that was never allocated. All requests that are satisfied in high storage must
be of a temporary nature, since all storage allocated 1n high storage 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 A-Disk has been made
accessible. It is necessary for DMSFRE to be used before
the size of virtual storage is known, since the saved
system can be used on any size virtual machine. Thus,
the first initialization routine initializes DMSFRE 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
exercised.
invokes the second initialization routine. This routine
is invoked after the size of virtual storage is known,
and it performs 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
high storage area. Allocates the FREETAB free storage table. This table
contains one byte for each 4K page of virtual storage,
and so cannot be allocated until the size of virtual
storage is known. The FREETAB table is initialized, and all storage
protection keys are initialized. All completely unallocated 4K pages on the low storage
nucleus free storage chain are removed to the user
chain. Any other necessary operations are performed.
invokes a routine that checks all free storage chains for
consistency and correctness. Thus, it checks to see
whether or not any free storage pointers have been
destroyed. This option can be used at any time for
system debugging. Part 3. Conversational Monitor System (CMS) 253
Previous Page Next Page