The DMSFRET macro releases free storage previously allocated with the DMSFREE macro. The format of the DMSFRET macro is:
[label] DMSFRET I label DiORDS={ n } (0) LOC={laddr} (1) r ,
ERR=lladdrl 1*' L r , I I r r " r r " I I,ERR=lladdrl I II I I I * II I IBALRII I L L JJ L L JJ J is any valid Assembler language label.
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.
is the address
"laddr" is any
(load address)
address directly
in register 1.
of the block of storage being released.
address that can be referred to in an LA instruction. LOC=laddr specifies the
while LOC=(1) indicates the address is
is the return address if an error occurs. "laddr" is any
address that can be referred to ty an LA (load address)
instruction. The error return is taken if there is a macro coding error or if there is a problem returning the
storage. If an asterisk (*) is specified, the error
return address is the same as the normal return address.
There is no default for this operand. If it is oaitted and an error occurs, the system will abend. I indicates how control is passed to Since DMSFRET IBALRI is a nucleus-resident routine, otner nucleus-resident
L routines can branch directly to it 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 corresponding user chain. Similar update operations will be performed, when necessary, after
calls to DMSFREE, as well. 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. CMS Introduction 2-21
2. The STRINIT macro instruction releases
any previous GETMAIN requests.
all storage allocated by
3. Almost all coamands issue a STRINIT macro instruction. Thus,
executing almost any CMS command will cause all GETMAIN storage to
be released.
Storage allocated by the DMSPREE macro instruction may be released in.
any of the following ways:
1. A specific block of such storaqe may be released by means of thp. DMSPRET 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 DMSPREE storage with TYPE=USER is released automatically. LAcepl the case of abena recovery, storage allocated by the DMSPREE 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 DMSPRET macro instruction. DMSPREE SERVICE ROUTINES The DMSPRES macro instruction is used by the system to request certain
free storage management services.
The format of the DKSPRES macro is:
r-------------------------------------------------------------------------------,
[label] DMSPRES INlT1
INIT2
CHECK CKON CKOFP UREC CALOC r r" I I IBALRII -t. t. I I I I I I I _____________________________________________________________________________ J
label IIIT1 is any valid Assembler language label.
invokes the first free storage initialization routine, 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 lNlT1 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 particular, it is sometimes possible to
release a block that vas never allocated.
2-22 IBM VM/370 System Logic and program Determination--Volume 2
Previous Page Next Page