Am 14.08.2021 um 20:46 schrieb Paul Gilmartin:
On Sat, 14 Aug 2021 20:02:42 +0200, Bernd Oppolzer wrote:
IIRC, DELETE does not really DELETE the module, if the use count (which
is in some of
the control blocks) is not zero. The use count is incremented on every
LOAD, which refers
to the load module and decremented on every DELETE.
Does the storage for all those control blocks and the load modules remain
in use, reclaimed exactly when that use count reaches zero?
Yes , the modules (and the control blocks - CDE, XTLST, LLE) remain in
storage,
as long as the use count does not reach zero.
We once had the situation at a site of a customer of mine, that a module
was called
many times using the following sequence of macro calls:
- LOAD (to keep the module in place between subsequent calls)
- CEEFETCH (needed because of the PL/1 writable static area ... the
module called was PL/1
compiled with RENT option; the calling module was ASSEMBLER)
- then CALL using machine instructions
- (no DELETE, see comment above on LOAD)
this was a (sort of) error. The CEEFETCH did not load the module,
because it recognized
that there was a usable copy; the LOAD (2nd time and so on) also didn't
LOAD it again,
but every LOAD incremented the use count by one; it was never decremented.
The modules are all RENT in this installation.
This worked OK for some time, but ...
because the use count in the control block is limited to 16 bits (IIRC),
after 32k or 64k calls, a very strange ABEND occurred.
We fixed this by changing the calling sequence, eliminating the
CEEFETCH, BTW,
and changing the compiler option of our PL/1 modules to NORENT (which
was later
recommended by IBM); RENT was not needed, because our modules are all
naturally reentrant anyway, but that's a different story ...
What we do normally (and what we did again, after returning to PL/1
NORENT, until today):
LOAD only on first call, then store the entry point in static storage in
the caller's CSECT,
and then call using only machine instructions on subsequent calls.
Kind regards
Bernd
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN