README.TXT for WINMEM 0.95 Build 165
7/9/95

----------------------------------------------------------------------------
INTRODUCTION and INSTALLATION
----------------------------------------------------------------------------

WINMEM is a 16-bit Windows program.  Its primary purpose is to display the
memory used by each executable file (programs, DLLs, DRVs, FONs), both in summary
and block-by-block detail.  It also provides information about the current
state of tasks and modules, information from the executable files from
which modules have been loaded and information about the current Windows
configuration.

WINMEM is distributed as a single executable file, but it requires certain
DLLs that are distributed with Windows 3.1: TOOLHELP, VER and LZEXPAND.  You
can run WINMEM on Windows 3.0 if you have these DLLs.  Additionally, WINMEM
will use CTL3DV2.DLL, if you have it in your Windows system directory, to
give the interface a 3-D appearance.

As with any Windows executable, you can run WINMEM from the File|Run options
in Program Manager or File Manager.  You can also run it by double-clicking
on it in a File Manager directory listing, or by adding it to a Program
Manager group and double-clicking its icon.  You can automatically load or run it
by adding it to the run= or load= in the [windows] section of WIN.INI, or
by adding it to your Startup group in Program Manager.

----------------------------------------------------------------------------
NOTES ON HOW IT WORKS
----------------------------------------------------------------------------

The main window of WINMEM has a list of all loaded modules and the memory
each uses.  WINMEM could have been designed to automatically update this
periodically in response  to WM_TIMER messages, but this seemed too much of a
CPU burden if the timing interval was set too short.  To approximate
automatic refreshing, WINMEM registers a callback procedure that is notified
whenever a module is loaded or freed, a task is started or terminated or a
module segment is loaded.  The callback sets flags according to what event
took place.  WINMEM periodically checks these flags, and only refreshes when
it knows that something has changed.  Since it is *not* notified for every
GlobalAlloc or GlobalFree call, the list may not always be completely
accurate.  There is a command button to allow you to force a refresh of the
list.

The Compact button on the main window causes WINMEM to make a
GlobalCompact(-1) call.  This will free all discardable segments and move
global blocks that are neither fixed nor locked (nor page locked).

The Detail button on the main window brings up a new window with detailed
information on the currently selected module.  If the module is associated
with a task, information for that task is also displayed.  Although a
module can be associated with multiple tasks, only one task will be shown.
The LocalHeap button on the Module Detail window is only active when the
currently selected segment in the global block list has a local heap.  It
brings up a window with a list of the allocated blocks on the local heap.
The Compact button on the Local Heap window causes WINMEM to make a
LocalCompact(-1) call for the heap being viewed.

The Unload button on the main window will unload the current module, or
terminate the task associated with the module if there is one.  This should
be used with extreme caution, mainly by developers after program crashes.

The Copy button on the main window will copy the module detail information,
including the module handle and reference count, to the clipboard.  The
Save button writes this information to a file; if the file already exists,
the data will be appended.

The system menu on the main window has an Options item.  This brings up a
dialog that allows you to set the refresh interval, that is, the period with
which WINMEM checks the flags set by the notify callback procedure.

WINMEM stores some configuration parameters in WINMEM.INI in your Windows
directory.  You can always start with a clean slate by deleting this file.

WINMEM was written in Object Pascal.

----------------------------------------------------------------------------
TEDIOUS LEGAL NOTICES
----------------------------------------------------------------------------

The program that this file accompanies is copyrighted material.  The
author grants permission for unlimited non-commercial use without
compensation.  This applies to individuals and educational institutions.
For information on licensing the program for use by government or
business organizations, contact the author via e-mail at
72611.2511@compuserve.com.

BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.

IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.

----------------------------------------------------------------------------
SUGGESTIONS
----------------------------------------------------------------------------

Mail your questions, comments or suggestions to 72611.2511@compuserve.com.
