home *** CD-ROM | disk | FTP | other *** search
- OS/2 System Resources (Swapping) - Version 1.23 - Comments
-
- For the longest time, my system at work, an IBM PS/2 Model 70, had only a
- 60 megabyte disk drive. With OS/2 installed, along with Microsoft C 6.0,
- WordPerfect and 15 megabytes of data files, I didn't have much space. What
- I could do was always being limited by how large the swap file was getting.
- To get a handle on what was going on, I created this program. It reports
- the available memory (according to DosMemAvail), the size of the swap file
- and the amount of free space left on the swap file's disk. It reviews
- everything once per second, but only updates the window as necessary.
-
- I've provided the source code. Feel free to make changes, just send me a
- copy and leave my name (and CompuServe ID) intact. I'm interested in your
- comments, especially in the support logic found in the module OBJECT.C. This
- module takes care of a lot of the normal overhead in building simple PM
- applications.
-
- Two weaknesses have been pointed out already: using the DosMemAvail
- function, and searching DPATH for the swapper file. Though DosMemAvail does
- not function very well under OS/2 1.x, it seems to work just fine under the
- latest OS/2 2.0 beta I've got, 6.177h. Seems that under the older OS/2, it
- reports the largest free block of memory. Under the newer version, it
- considers all free memory to be a single block, as it can be remapped at
- will by the 386 processor.
-
- As for using DPATH to find the swapper file, I frankly didn't even think
- of reading the CONFIG.SYS file to find the SWAPPATH statement. With version
- 1.10, this has been fixed.
-
- As of version 1.10, there is now a simple CPU load meter. Also, each
- display item can be enabled or disabled through the system menu.
-
- As of version 1.20, the free space on each disk drive (except A & B) is
- now available for display.
-
-
- Author:
-
- Rick Papo, CompuServe 72607,3111.
-
-
- History:
-
- 1.00 - Submitted to Compuserve's OS/2 Forum, early January, 1992.
-
- 1.01 - Added single-line border.
- Removed default TaskList processing, added custom logic.
-
- 1.10 - Added ability to hide controls.
- Added ability to be moved with the mouse, independent of title bar.
- Added help facility.
- Removed 'exit' option from system menu (Alt+F4 or F3 does fine).
- Now searches CONFIG.SYS to find SWAPPATH.
- Responds to WM_PRESPARAMCHANGED messages, allowing OS/2 2.0's
- font, color and color scheme palettes to work with it properly.
- Added CPU load indicator.
- Added ability to select which items are to be monitored.
- Added ability to reset presentation parameters to default state.
-
- 1.20 - Restructured program to make status items easier to add.
- Changed 'Swap-disk free space' to 'Available swap space'.
- Added disk drive free space items.
- Optimized window refresh logic.
- Corrected minor bugs in handling font changes.
-
- 1.21 - Fixed bug in computing swap-file size.
-
- 1.22 - Fixed bug in computing available swapping space.
-
- 1.23 - Fixed bugs in initial sizing and location of CONFIG.SYS.
-