Releasing Allocated Storage DWORDS= n t ((0) \ is the number of doublewords of storage to be released. DWORDS=n specifies the number of doublewords directly and DWORDS=(O) indicates
that register 0 contains the number of doublewords being released. Do not
specify any register other than register O. 1 (1) \ is the address of the block of storage being released. "laddr" is any
address that can be referred to in an LA (load address) instruction.
LOC=laddr specifies the address directly while LOC= (1) indicates the
address is in register 1. Do not specify any register other than register 1.
ERR= is the return address if any error occurs. "laddr" is any address that can be
referred to in an LA (load address) instruction. The error return is taken if
there is a macro coding error or if there is not enough free storage available
to fill the request. If the asterisk (*) is specified for the return address, the
error return is the same as a normal return. There is no default for this
operand. If it is omitted and an error occurs, the system abends.
TYPCALL= [SVC ]
BALR
indicates how control is passed to DMSFRET. Since DMSFRET is a
nucleus-resident routine, other nucleus-resident routines can branch direct­
ly to it (TYPCALL=BALR), while routines that are not nucleus-resident
must use SVC linkage (TYPCALL=SVC). When DMSFRET is called, the block being released is placed on the appropriate
chain. At that point, the final update operation is performed, if necessary, to
advance FREELOWE, or to move pages from the nucleus chain to the correspond­
ing user chain. Similar update operations are performed, when necessary, after calls to
DMSFREE, as well. Storage allocated by the GETMAIN macro instruction may be released in either of
the following ways:
1. A specific block of such storage may be released by means of the FREEMAIN
macro instruction.
2. Whenever any user routine or CMS command abends (so that the routine DMSABN is entered), and the ABEND recovery facility of the system is
invoked, all GETMAIN storage pointers are reset.
Functional Information 329
DMSFRE Service Routines Storage allocated by the DMSFREE macro instruction may be released in either of
the following 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 TYPE= 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.
The DMSFRES macro instruction is used by the system to request certain free
storage management services.
The format of the DMSFRES macro is:
[label]
where:
label
INIT1
DMSFRES INIT1
INIT2
[ , TYPCALL= [ ] ]
CHECK CKON CKOFF UREC CALOC is any valid Assembler language label.
invokes the first free storage initialization routines, so that free storage
requests can be made to access the 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 complete. In par­
ticular, it is sometimes possible to release a block that was never
allocated.
All requests that are satisfied in high storage must be of a tempo­
rary nature, since all storage allocated in 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 neces­
sary for DMSFRE to be used before the size of virtual storage is
known, since the saved system can be used on any size virtual 330 VM/SP System Programmer's Guide
Previous Page Next Page