next up previous contents index
Next: MZWIPE - reset Up: Memory management Previous: MZREPL - connect

MZDROP - drop a bank and its dependents

With MZDROP one may either drop the bank at L or, if the L option is given, the linear structure at L. Dropping a bank implies dropping also the whole partial data-structure which depends on this bank downwards.

Dropped banks stay in memory with the IQDROP status-bit set, links pointing to them continue to do so, except for the immediate structural link indicated via the origin-link of the bank at L, which is bridged or reset to zero, whichever is appropriate.

To drop one gives

CALL MZDROP (IXSTOR, !L, chOPT)

with

      IXSTOR  index of the store or of any division in this store,
              zero for the primary store

          !L  the address of the bank or linear structure to be dropped

       chOPT  character string of options:

                  default: drop the bank at L only,
                  ie. the 'next' link of this bank is not followed

               L  drop the linear structure pointed to by L
                  ie. the 'next' link of the bank at L is followed

               V  drop only the partial data-structure
                  dependent vertically downwards from the bank at L,
                  but not the bank itself.

MZDROP prints a monitor log message at level 2.

The parameter L in the call to MZDROP is not as such changed on return, but if it is the structural link supporting the d/s it will in fact be up-dated for the removal of the first bank in this structure.

Suppose this artifical sequence of operations (with LS=0 initially):

      CALL MZLIFT (0,L,LS,1,...)          create bank '3'
      CALL MZLIFT (0,L,LS,1,...)          create bank '2'
                                  LS now points to bank 2

      CALL MZLIFT (0,L,LS,1,...)          create bank '1'
                                  LS now points to bank 1

      CALL MZDROP (0,LS,'.')              drop bank 1
                                  LS now points again to bank 2

if however the dropping is done with

      CALL MZDROP (0,L,'.')               drop bank 1

         then LS will be made to point to bank 2,
         but L will continue to point to the (dead) bank 1.
Since the parameter L in the call to MZDROP is not changed, selective dropping of banks in a linear structure can be done with a loop like this:
      L = start adr of the linear structure
   12 IF (L.NE.0)  THEN
          IF (bank not wanted)  CALL MZDROP (0,L,'.')
          L = LQ(L)
          GO TO 12
        ENDIF


Janne Saarela
Mon May 15 08:34:47 METDST 1995