Maybe I'm missing something here, but isn't it highly dangerous to
assume just because CSA/ECSA is "unowned" that it is also "unused" and
not referenced by some address pointer somewhere?
If you can determine the application that stranded the storage and
"know" 100% that it should have freed the storage that is one thing; but
there certainly used to be products that had an initialization process
that would create something in CSA/ECSA to be used by later address
spaces and then terminate. Freeing one of those types of storage areas
would generally be bad news.
[EMAIL PROTECTED] wrote:
On Sep 3, 5:27 am, Jaleel <[EMAIL PROTECTED]> wrote:
Is there a way to free up "unowned"(not realeased) CSA/ECSA storage ?
Yes, you can free CSA if you want to write
a program to do so.
You can use Resource Measurement Facility
(RMF) or a performance monitor from an ISV
to display the storage allocation
information that the storage tracking
function collects. You can also use IPCS to
get this info from a dump (i.e, VERBEXIT
VSMDATA).
By using RMF you can try to find out which
jobs or address spaces are using an excessive
amount of CSA storage or have ended without
freeing CSA. However, this may work only for
authorized programs which have included the
OWNER parameter when issuing CPOOL BUILD,
GETMAIN, and STORAGE OBTAIN macros that get
storage in CSA.
This means if you write your own program to
free CSA, you will need to associate storage to
be freed with an address space. Normally if
an address space grabs CSA, it should have
its own logic to release it unless the task needs
to have the CSA storage remain persistent. This
is where a task may be recycled several times
within an IPL up-time, and the task needs an
anchor block in CSA to reference upon start-up.
Your program will need a combination of
macros using VSMLIST,SPACE=UNALLOC,SP=CSA,
plus you will need to write an analyze
routine in your program for the VSMLIST
report, and then MODESET to be in
supervisor state, key 0, then SETLOCK
OBTAIN,TYPE=CML for cross-memory lock,
branch entry FREEMAINS, and SETLOCK
RELEASE,TYPE=CML to release the lock. You
must ensure you get it exact and you don't
target an unintended area.
There are ISV performance monitors that
have this ability, and it may be better
to use those than try to write your own.
--
Joel C. Ewing, Fort Smith, AR [EMAIL PROTECTED]
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html