April 1, 1981 (DMSFRET) The block of storage that is being released was
never allocated byDMSFREE. 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 proqram area betweenFREELOWE and FREEUPPR. • The block crosses a
allocated forUSER NUCLEUS type storage.
page boundary
storaqe from
that separates a page
a page allocated for• The block overlaps another block already on the free
storaqe chain.
7(DMSFRET) The address given for the block being released is
not doubleword aligned.
8(DMSFRES) An invalid request code vas passed to the DKSFRES routine. Since all request codes are generated by the DKSFRES 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 purpose of theCMS Nucleus protection scheme is to protect the CMS nucleus from inadvertent destruction by a user program. Without it, it
would be possible, for example, for aFORTRAN user who accidentally
assigns an incorrectly subscripted array element to destroy nucleus
code, wipe out a crucial table or constant area, or even destroy an
entire disk by destroying the contents of the master file directory.
In general, user programs and disk-residentCMS commands are executed
with aPSW key of X'E', while nucleus code is executed with a PSi key of X' 0'.
There are, however, some exceptions to this rule. Certain
disk-residentCMS commands run with a PSW key of X'O', since they have a
constant need to modify nucleus pointers and storage. The nucleus
routines calledby the GET, PUT, READ, and WRITE macros run with a user PSW key of X'E', to increase efficiency.
Two macros are available to any routine that wishes to change itsPSi key for some special purpose. These are the DMSKEY macro and the DMSEXS macro.
TheDMSKEY macro may be used to change the PSW key to the user value
or the nucleus value. TheDMSKEY NUCLEUS option causes the current PSW key to be placed in a stack, and a value of 0 to be placed in the PSi key. The DMSKEY USER option causes the current PSi key to be placed in
a stack; and a value ofX'E' to be placed in the PSW key. The DMSKEY RESET option causes the top value in the DMSKEY stack to be removed and
re-inserted into thePSW. It is a requirement of the CMS system that when a routine terminates,
theDMSKEY stack must be empty. This means that a routine should
execute aDMSKEY RESET option for each DMSKEY NUCLEUS option and each DMSKEY USER option executed by the routine. Part 3. Conversational Monitor System (CMS) 255
never allocated by
storage free storage area or the user proqram area between
allocated for
page boundary
storaqe from
that separates a page
a page allocated for
storaqe chain.
7
not doubleword aligned.
8
9
error in the free storage management routine.
The purpose of the
would be possible, for example, for a
assigns an incorrectly subscripted array element to destroy nucleus
code, wipe out a crucial table or constant area, or even destroy an
entire disk by destroying the contents of the master file directory.
In general, user programs and disk-resident
with a
There are, however, some exceptions to this rule. Certain
disk-resident
constant need to modify nucleus pointers and storage. The nucleus
routines called
Two macros are available to any routine that wishes to change its
The
or the nucleus value. The
a stack; and a value of
re-inserted into the
the
execute a