home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 8 Other / 08-Other.zip / MEM_OS2.ZIP / MEM_OS2.TXT < prev   
Text File  |  1988-08-16  |  2KB  |  41 lines

  1.                   MEM_OS2.ARC
  2.  
  3.     MEM_OS2.EXE is a more sophisticated version of OS2MEM.EXE, a
  4. program that I wrote earlier this year which displays the results of a
  5. call to the the API function DosMemAvail.  
  6.     This new version is uses the multitasking ability of OS/2 to
  7. bring up a number of threads which execute concurrently and enable the
  8. user to more closely monitor the memory demands of the system.
  9.     The first thread repeatedly updates and displays the value 
  10. returned by DosMemAvail, dynamically both as a number and on a bar graph.
  11. The second thread displays the time. The third of the concurrent
  12. threads polls keyboard to see if the escape key is pressed by the user.
  13.     I set the priority for these threads quite low (they run as
  14. background processes) although the program is begun normally from the
  15. command line, _not_ as a detached process.  In this way I avoided having
  16. to use pop-ups, as I consider them too abrupt to be asthetically pleasing,
  17. and I decreased the load on the processor from the running threads.
  18.     The program is begun by entering its name on the command line or
  19. selecting it from the Program Selector.  It pulls up the threads, which
  20. continue to run until the user presses ESC.  As you load additional
  21. programs, you can switch back to MEM_OS2.EXE and see how the memory load
  22. has changed downward; as you terminate programs, you can watch the available
  23. memory increase.  With MEM_OS2.EXE running in the forground, the memory
  24. usage of any background processes or other screen groups is dynamically
  25. displayed.
  26.     Although DosMemAvail is described as a snapshot approach, I have
  27. found that the value returned closely tracks the actual memory available
  28. to the system, because the OS/2 MMU apparantly tries to keep rebuilding the
  29. largest memory block available when a program frees up some memory it was
  30. using.
  31.     This program was developed on a no-name AT clone w/3mg Ram, using
  32. MSC 5.1 and IBM OS/2 ver 1.0.
  33.     If you have any questions about any of this, contact me at 
  34. CompuServe 72261,347.
  35.  
  36.                 
  37.                 Harve Schiffman
  38.                 8-03-88
  39.     
  40.  
  41.