Copyright: WinMap copyright ® 1993, 94 by Olaf Hež
Citation: A memory-map-tool for Windows


Contents

WinMap 2.0 copyright © 1993, 94 by Olaf Hess

WinMap is a Windows 3.1 utility that displays how much memory the various programs, fonts and drivers that are loaded use.

CAREWARE

WinMap is neither shareware nor dollar-ware nor freeware, it's CAREWARE, meaning that if you like it please donate some money to a public welfare organization like Unicef, Amnesty International, the World Wildlife Fund, or Greenpeace.

    The main window

    The File menu

    The List menu

    The Module menu

    The Options menu

    Revision history

    Contacting the author

If you are interested in a German version of WinMap please send a mail to my CompuServe account 100 031, 35 36 and I will send it via E-Mail to you.


The Main Window
The WinMap window

The WinMap main window shows how much memory the various programs, DLLs, drivers, and fonts that are loaded use. The values given are in kilobytes.

This bitmap contains hotspots. Click on the window-elements you want to get more information about!


The File menu

Save list

Allows you to save the entries in the list to a file.

Quit WinMap

Exits the program.


The List menu

All

Lists all modules, regardless of type. This includes programs, DLLs, drivers, fonts, VBX-controls, etc.

Fonts

Lists only bitmaped fonts. A font file is a DLL that contains only ressources.

Drivers

Lists all modules with an extension of DRV like KEYBOARD.DRV, TIMER.DRV or MMSOUND.DRV.

System

Lists only the three system libraries KERNEL, USER, and GDI plus WIN87EM.DLL.

Programs

Lists all modules, that are neiter fonts nor drivers nor system libraries.

Virtual drivers

Lists all the VxDs (virtual device drivers) that are currently loaded in memory. Please note that a lot of important VxDs are contained in the file WIN386.EXE. Furthermore, the name of a driver in memory may not correspond to the filename.

This feature only works under Windows 3.1 and Windows for Workgroups 3.11. It does not work under the first public beta release of Windows 4.0 (Chicago).


The Module menu

Path

Shows the path of the currently selected module.

Get module info

Displays information about the currently selected module.


The Options menu

Font size

Allows the user to change the size of the font in the WinMap listbox.


WindowTitle
WinMap titlebar

The titlebar tells you, what kind of modules WinMap displays in its main window. To change this setting, either click on one of the buttons in the toolbar or choose your preferred setting in the List menu.


The WinMap toolbar

The toolbar allows you, to quickly change the settings for the listbox in WinMap's main window.

All shows all loaded modules, regardless of their type. Fonts shows only font-modules, Drivers only the memory occupied by DLLs with the extension DRV, System shows how much space is allocated by the system-libraries Kernel, User, GDI, and WIN87EM.DRV, and Programs lists all modules that are neither fonts nor drivers nor system-libraries.


Module-Info
Modules

A module is an executable file, either a program (that in most cases has the extension .EXE, an exeption from this rule are screen savers files with the extension .SCR) or a dynamic link library (DLL). Even though you can run multiple copies of some Windows applications (like WRITE.EXE) there is always only one copy of the module in memory.

Note that some DLLs contain only resources. An example for this are font files. Note also that some DLLs have the extension .EXE (like GDI.EXE, USER.EXE) and that drivers (extension .DRV), Visual Basic VBX libraries (extension .VBX) and a lot of other files are DLLs, too.


Info on discardable memory
Discardable memory

Discardable memory objects represent the most efficient kind of memory used by Windows' memory manager, because objects can be discarded from memory to make room for any new objects that would otherwise be unallocatable due to a lack of space in the heap. Objects are never discarded until Windows' virtual memory manager runs out of space. The most typical examples of discardable memory are the code and resource segments in an application or library. Data segments aren't designated as discardable due to the difficulty (usually) in re-creating the data.

Code and resource segments that have been discarded by the Windows' heap manager are reloaded into memory from disk when an application or library tries to access and use them.


Fixed memory info
Fixed memory

Fixed memory blocks stay in memory all the time. Windows' memory manager doesn't discard them when the system runs out of memory. Fixed memory blocks usually contain data segments or code segments that are marked as fixed because they contain code that has to remain in memory all the time (an interrupt handler for example).

When Windows is running in enhanced mode on a 386 or better, even fixed memory can end up getting swapped to disk by the virtual memory manager when the system runs out of physical memory. Once the memory is needed, the memory manager transfers it back into memory. This happens without the user knowing about it. He only sees the hard disk activity when Windows accesses the swapfile to swap data out or to read it back in.


Info on total memory
Total memory

Total memory is the sum of discardable and fixed memory (values in KByte).


Info on selected entry
Currently selected entry

If you double-click on the currently selected entry or press [Enter] or [Space] a messagebox pops up and tells you the full file- and pathname of the currently selected module.


Info on totals at bottom
Total amount of memory used by all modules

This line at the bottom of the WinMap window tells you, how much memory all the modules in the list use (values in kilobytes). The first value is the sum of all discardable memory, the second entry sums up the fixed memory, the third entry contains the sum of discardable and fixed memory.


Save list to file dialog

If you want to save the current module list to a file enter the filename and click on the OK-button. To save the list select Save list in the File menu. If you are about to overwrite an existing file, the program issues a warning.


Kernel

Windows functions involving memory management, multitasking, and ressources belong to the Kernel module. Kernel exports functions for string management, resource management, local and global heap (memory) management, module management, and task management.

Under Windows 3.1, there are two different versions of the Kernel module: KRNL286.EXE for 286 machines or Standard mode, and KRNL386.EXE for 386 and higher processors running Windows in Enhanced mode.


USER

The User module controls everything in Windows involving window creation, communications, hardware, and messaging.


GDI

The GDI (Graphics Device Interface) module is responsible for exporting the painting, drawing, plotting, printing, and color functions of Windows.


WIN87EM.DLL

WIN87EM.DLL emulates a floating point CPU on systems without a 80x87 FPU. It is required by programs using floating point math.


Virtual Device Drivers

A virtual device driver (VxD) is a 32-bit, protected-mode driver that manages a system resource, such as a hardware device or installed software, so that more than one application can use the resource at the same time.

The term VxD is used to refer to a general virtual device driver, the x represents the type of device driver.  For example, a virtual device driver for a display device is known as a VDD, a virtual device driver for a timer device is a VTD, a virtual device driver for a printer device is a VPD, and so forth.  Windows uses virtual devices to support multitasking for MS-DOS-based applications, virtualizing the different hardware components on the system to make it appear to each MS-DOS VM that it is executing on its own computer. Virtual devices work in conjunction with Windows to process interrupts and carry out I/O operations for a given application without disrupting how other applications run.

Virtual device drivers support all hardware devices for a typical computer, including the programmable interrupt controller (PIC), timer, direct-memory-access (DMA) device, disk controller, serial ports, parallel ports, keyboard device, math coprocessor, and display adapter.  A virtual device driver can contain the device-specific code needed to carry out operations on the device.  A virtual device driver is required for any hardware device that has settable operating modes or retains data over any period of time.  In other words, if the state of the hardware device can be disrupted by switching between multiple applications, the device must have a corresponding virtual device.  The virtual device keeps track of the state of the device for each application and ensures that the device is in the correct state whenever an application continues.

Although most virtual devices manage hardware, some manage only installed software, such as an MS-DOS device driver or a terminate-and-stay-resident (TSR) program.  Such virtual devices often contain code that either emulates the software or ensures that the software uses data that applies only to the currently running application.  ROM BIOS, MS-DOS, MS- DOS device drivers, and TSRs provide device-specific routines and operating system functions that applications use to indirectly access the hardware devices. Virtual device drivers are sometimes used to improve the performance of installed software; the 80386 and compatible microprocessors can run the 32-bit protected-mode code of a virtual device more efficiently than the 16-bit real-mode code of an MS-DOS device driver or TSR. In addition, performance is also enhanced by eliminating ring transitions that result in executing 32-bit applications that access 16-bit real-mode services. With virtual device drivers, the system can stay in protected-mode.


Revision History

V1.0 (08/93): Initial release.

V1.1 (12/93): Added support for CTL3D.DLL (still runs without this DLL) and the Save list to file feature.

V1.11 (03/94): Uses Truetype font for display, thus fixing a bug that showed up on some systems when using large screen fonts.

V1.20 (06/94): Added a toolbar, option to change the font size.

V2.00 (07/94): Added the more detailed module information and the VxD-list (thanks to Andrew Schulman for his article on this subject in Dr. Dobb's Journal 12/93). Added this help file.


Contacting the author

If you have any questions concerning WinMap please don't hesitate to contact me (Olaf Hess) via CompuServe. Please don't write to me, don't call me. I only reply to E-Mail and am not willing to answer letters or send diskettes around.

My CompuServe ID is 100 031, 35 36, from the Internet it's 100031.3536@compuserve.com.

The only means of distribution that I use to distribute WinMap is to upload it to the WINSHARE forum on CompuServe.

WinMap is copyright © 1993 by Olaf Hess. WinMap may be used and distributed freely, subject to the condition that no charge is made (a small fee for media and handling is permissible). Distribution with the intend of mass production requires the written permission of the copyright holder.

WinMap was written using Borland Pascal 7.0, this help file was written using the Windows Help Magician 2.6; both superb tools!

And now, to keep the lawyers (and me) happy:

Disclaimer:

THE INFORMATION AND CODE PROVIDED HEREUNDER (COLLECTIVELY REFERRED TO AS "SOFTWARE") IS PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL OLAF HESS OR HIS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF OLAF HESS OR HIS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.


Module Information

	Module gives the module name. Please note that this name may be different from the file name. KERNEL for example has the module name KERNEL but the file name KRNL386.EXE if Windows runs in enhanced mode or KRNL286.EXE if Windows runs in standard mode. The line PROGMAN is used by 1 Module(s) says that no other program uses the Program Manager. Note that this number is always equals one or is higher, because every module is at least used once (by itself). If you would run two copies of Windows Write, select its entry in the WinMap list and call up the "Get module info" dialog it would state that "WRITE is used by 2 Module(s)". The Module type is either EXE (for programs) or DLL (for dynamic link libraries). Please note that there is no relation between a file's extension an its module type. GDI for example is a dynamic link library but has the file name GDI.EXE. PROGMAN uses tells you which DLLs are used by PROGMAN. Note that this list only lists DLLs loaded statically by PROGMAN when the program starts. Some programs, WinMap is one example, load DLLs on the fly (WinMap loads CTL3D for its 3D look when it finds it on the harddisk). DLLs loaded on the fly are not listed in this list. The Path button displays the path of the selected DLL.