INIT2
CHECK CKON CKOFF UREC CALOC 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 nec­
essary 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 FREET AB 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 FREET AB table is initialized, and all storage protection keys
are initialized.
invokes a routine that checks all free storage pointer chains for con­
sistency and correctness. Thus, it checks to see whether or not any
free storage pointers have been destroyed. The option can be used at
any time for system debugging.
turns on a flag that causes the CHECK routine to be invoked each
time a call is made to DMSFREE or DMSFRET. This can be useful
for debugging purposes (for example, when you wish to identify the
routine that destroyed free storage management pointers). Care
should be taken when using this option, since the CHECK routine is
coded to be thorough rather than efficient. Thus, after the CKON option has been invoked, each call to DMSFREE or DMSFRET will
take much longer to be completed than before.
turns off the flag that was turned on by the CKON option.
is used by DMSABN during the abend recovery process to release all
user storage.
is used by DMSABN after the abend recovery process has been com­
pleted. It invokes a routine which returns, in register 0, the number of
doublewords of free storage that have been allocated. This number is
used by DMSABN to determine whether or not the abend recovery
has been successful.
TYPCALL= [SVC ]
BALR
indicates how control is passed to DMSFRES. Since DMSFRES is a
nucleus-resident routine, other nucleus-resident routines can branch
directly to it (TYPCALL=BALR), while routines that are not
nucleus-resident must use SVC linkage (TYPCALL=SVC).
Functional Information 331
Error Codes from DMSFREE, DMSFRES, and DMSFRET
A nonzero return code upon return from DMSFREE, DMSFRES, or DMSFRET indicates that the request could not be satisfied. Register 15 contains this return
code, indicating which error occurred. The following codes apply to the DMSFREE, DMSFRES, and DMSFRET macros. Code Error
1 (DMSFREE) Insufficient storage space is available to satisfy the request
for free storage. In the case of a variable request, even the minimum
request could not be satisfied.
2 (DMSFREE or DMSFRET) User storage pointers destroyed.
3 (DMSFREE, DMSFRET, or DMSFRES) Nucleus storage pointers
destroyed.
4 (DMSFREE) An invalid size was requested. This error is taken if the
requested size is not greater than zero. In the case of variable requests, this
error exit is taken if the minimum request is greater than the maximum
request. (However, the latter error is not detected if DMSFREE is able to
satisfy the maximum request.)
5 (DMSFRET) An invalid size was passed to the DMSFRET macro. This
error exit is taken if the specified length is not positive.
6 (DMSFRET) The block of storage that is being released was never allo­
cated by DMSFREE. Such an error is detected if one of the following
errors is found:
The block does not lie entirely inside either the low storage free storage
area or the user program area between FREELOWE and FREEUPPR. The block crosses a page boundary that separates a page allocated for USER storage from a page allocated for NUCLEUS type storage.
The block overlaps another block already on the free storage chain.
7 (DMSFRET) The address given for the block being released is not
doubleword aligned.
8 (DMSFRES) An invalid request code was passed to the DMSFRES routine. Since all request codes are generated by the DMSFRES macro, this error
code should never appear.
9 (DMSFREE, DMSFRET, or DMSFRES) Unexpected and unexplained
error in the free storage management routine. eMS Handling of PSW Keys
The CMS nucleus protection scheme protects the CMS nucleus from inadvertent
destruction by a user program. This mechanism, however, does not prevent you
from writing in system storage intentionally. Because you can execute privileged
instructions, you can issue a LOAD PSW (LPSW) instruction and load any PSW key you wish. If this occurs, there is nothing to prevent your program from:
332 VM/SP System Programmer's Guide
Previous Page Next Page