MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How to release unsed memory

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF
View previous topic :: View next topic  
Author Message
sssppp
Beginner


Joined: 21 Nov 2005
Posts: 2
Topics: 2

PostPosted: Fri Nov 25, 2005 1:01 pm    Post subject: How to release unsed memory Reply with quote

1. Is there any MVS/TSO/ISPF command that can release the memory or
2. Is there any methode through which I can get the usage of all the currently running processes in terms of memory under my TSO Login session.

Some of the times it happened that system prompt that Insufficient Memory. When I close down a few of the running applications, then only I am able to run the application which was not getting the enough memory.

thanks
sp
Back to top
View user's profile Send private message
semigeezer
Supermod


Joined: 03 Jan 2003
Posts: 1014
Topics: 13
Location: Atlantis

PostPosted: Fri Nov 25, 2005 3:34 pm    Post subject: Reply with quote

There are various tools that can tell you the total amount of memory in use by your TSO session, such as RMF, TASID, SHOWMVS, probably OMEGAMON, and others. There are also many Rexx execs on the web that will show you memory layout within the system.

It sounds like you have a Unix or Windows background. MVS does not have 'processes' per se. It has Address spaces (sort of similar to a Windows process) and tasks (analagous to a Windows thread). Within any address space such as a TSO session, there are several tasks, sometimes referred to as a TCB because this the main control block for each task. Memory is allocated by programs running in each task, but that memory can be shared among tasks. When the owning task goes away, so does the memory it allocated. As far as I know there is no easy way to find out how much memory a particular TCB using, though I'm sure it can be determined by running the memory allocation control block chains. TASID is one program that does run those chains, though the function is sort of hard to find. If you are running Tasid (search for it at the IBM web site), then use option 7 (storage view), then type L or LISTMAP. That will show you a list of TCBs:
Code:
CPU=0%                       Job Step TCB Map                       Line 1 of 8
Command ===>                                                  Scroll ===> CSR

                 Select a TCB to view its storage.

          C   TCBs                 Program    Sections    Size
        +------------------------+----------+-------+----------+
        |   008FDF30             | IEAVAR00 |    44 |    93000 |
        |    008FD230            | IEFSD060 |    41 |    C4000 |
        |     008FD098           | IKJEFT01 |    67 |    FF000 |
        |      008E1D40          | IKJEFT02 |    47 |    8D000 |
        |       008E1BA8         | IKJEFT09 |    42 |    87000 |
        |        008E1A10        | ISPMAIN  |    73 |   109000 |
        |         008E1878       | TASID    |    74 |    CF000 |
        |    008FD4C0            | IEAVTSDT |     3 |    1B000 |
        +------------------------+----------+-------+----------+

select the TCB you are interested in and you will see the storage layout and total for that TCB.
Code:
CPU=0%      Storage and modules for TCB at 008E1878                Area 1 of 30
Command ===>                                                  Scroll ===> CSR
 Select an area to view.             Total virtual storage: 828Kb
      C Start      Length Subpool    Loaded modules:
   |    00033000     B000      0|   TASID    ISPCFIGU IKJEFT25 IRXEFMVS
   |    00043000     6000      0|   IRXEFPCK IRXFLOC  IRXFUSER IRXANCHR
   |    00054000     7000      0|
   |    0005F000    12000      0|
   |    09F02000     1000      0|
   |    09F81000     2000      0|
   |    09F86000     4000      0|
   |    09FCA000     7000      0|
   |    09FD2000     1000      0|
   |    09FD8000     A000      0|
   |    00049000     1000      1|
   |    09F7C000     2000      1|
   |    0000D000     8000     78|
   |    09F07000     5000     78|
   |    09F1A000     B000     78|
   |    09F28000    31000     78|  Contiguous areas of storage are combined
   |    09F71000     B000     78|  into single sections in the display.
   |    7F4C1000     1000    229|
   |    7F4C4000     1000    230|
   |    7F4C3000     1000    230|


That can be used to find the storage alloated by a particular task or program. Not too simple to use, but it will tell you what programs are using the most memory.

There is no such thing as "unused memory" - memory is considered to be in use until the allocating program frees the memory or ends. There is not a concept pf "garbage collection" inherent in the MVS memory managers.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group