Copyright: Copyright (c) Chicago-Soft Ltd 1995


WinMiser Contents

Contents for WinMiser Help

The shareware version of WinMiser manages Windows DOS memory for the Microsoft Windows 3.1, 3.11, and Windows for Workgroups.

How To...
Install WinMiser
Remove WinMiser

Windows DOS Memory Tutorial
Introduction
Technical Background
DOS Limitations
Windows 3.1 Limitations
Windows DOS Memory Management
Insufficient Windows DOS Memory Symptoms


Windows DOS Memory - Introduction

Introduction

Microsoft Windows Version 3.1 is a remarkable PC operating system in both functionality and in user acceptance.  However, there are a number of problems with Windows memory management.  In particular, Windows is vulnerable to problems with insufficient "DOS" or "low" memory.  Systems which experience these problems may be unable to launch new programs, or they may need to start programs in a particular order.

WinMiser can correct problems associated with insufficient Windows DOS Memory.  Once installed, WinMiser acts as a guardian of this precious resource, only allowing applications that specifically request Low Memory to receive memory from this region.  Since most programs use very little Windows DOS Memory, WinMiser prevents Low Memory from being exhausted in all but the most extreme cases.


Windows DOS Memory - Technical Background

Technical Background

One problem with explaining Windows memory problems is the complexity of the whole issue. In particular, there is a seemingly endless list of types of memory such as:

Conventional Memory
Upper Memory Block (UMB)
High Memory Area (HMA)
Expanded Memory (EMS)
Extended Memory (XMS)
Physical Memory
Virtual Memory
Linear Memory
Global Memory
Local Memory
User Memory
GDI Memory

Most users of Windows do not and should not understand all of these terms.  It is only because of memory limitations within DOS and Windows that these terms are even discussed.


Windows DOS Memory - DOS Limitations

DOS Limitations

When DOS was first introduced, it was built for the 8088 chip.  One limitation of this processor is that programs can only address 1 megabyte of storage.  In addition, the designers reserved 384K bytes for system use, leaving only 640K available to programs.  At first this was not an issue.  However it soon became a major problem as programs got larger and users tried to execute more programs at the same time.

The introduction of the 80286 chip allowed programs to address up to 16 megabytes of memory when operating in Protected Mode.  The problem is that DOS was written for Real Mode and does not use Protected Mode to address the additional memory directly.  Even today on 80836, 80846 and Pentium PCs with more than 16 megabytes of memory, DOS can only address the first megabyte.


Windows DOS Memory - Windows 3.1 Limitations

Windows 3.1 Limitations

Windows 3.1, for all of its abilities, is still based on DOS and therefore inherits the limitations of DOS.  In order to work, Windows must be able to share memory with DOS as well as device drivers and TSRs that were loaded before Windows was started.  These "pre-Windows" modules are based on Real Mode and can only access the first megabyte of memory.  Thus, for Windows to work with these modules, it must have a way to place specific items in Low Memory.

This is where Windows "DOS" or "low" memory comes in.  Windows DOS Memory is simply the lowest 640K bytes of memory.  This memory area is unique because it can be accessed by programs that operate in Real Mode (DOS), and programs that operate in Protected Mode (Windows).


Windows DOS Memory - Windows DOS Memory Management

Windows DOS Memory Management

Windows has two conflicting memory management schemes that lead to Windows DOS Memory shortages.

First, Windows provides the ability for programs to specifically allocate memory in the Windows DOS Memory area.  The actual API is called "GlobalDosAlloc".  Programs are only supposed to use this API when they need memory that will be used by DOS, Device Drivers, or TSRs that operate in Real Mode.  In most cases, there is little need for this type of memory.  All programs that execute under Windows use 512 bytes of this area in order to store information needed by DOS.  Only specific types of applications need to use additional memory from this area, and then only a small amount of it.

Second, when a Windows based application allocates memory from Windows it can specify different types of memory.  In particular, it can specify whether the memory will be "fixed" or "moveable".  The important difference between these two types of memory is that fixed memory is allocated from the lowest available memory up and moveable memory is allocated from the highest available memory down.  This means that when a Windows based application requests fixed memory, Windows will use Windows DOS Memory if possible.

The problem with insufficient Windows DOS Memory is typically due to programs allocating fixed memory.  This is very common in applications that use hardware features of the PC such as Local Area Network (LAN) connections or multimedia.  This type of program can consume large portions of fixed and thus Low Windows Memory.  If these programs with fixed memory requirements use all of the available Windows DOS Memory, then other programs that need to use this limited resource will be unable to execute.


Windows DOS Memory - Insufficient Windows DOS Memory Symptoms

Insufficent Windows DOS Memory Symptoms

One of the problems with insufficient Windows DOS Memory problems is that they are hard to diagnose.  There is no error message that says you are out of Windows DOS Memory.  Windows doesn't provide a statistic for Windows DOS Memory usage like it does with total memory and free system resources.  Typically all the user will notice is the following types of problems:

1) Insufficient Memory to Load this Application.

When an attempt to start a new program from Program Manager, File Manager, or from an icon fails,  Windows will display this error message.  One reason for this message is insufficient Windows DOS Memory.  Windows must allocate a 512 byte block of Windows DOS Memory for every Windows task.  If Windows is unable to allocate this block, a new task can not be started.

The other common reason for this error is insufficient system resources.  You can confirm this problem by selecting the "About Program Manager..." menu item under Program Manager's "Help" menu selection.  The System Resources field at the bottom of this dialog box shows the percent of free system resources.  If this value is below 10%, Windows will not start any new programs.

If this is not the case, the most likely problem is insufficient Windows DOS Memory.

2) Erratic Program Behavior

Sometimes one Windows program will attempt to start another program.  For example, when using the Windows Help facility, the Windows Help program is started when you click on a "Help" button.  If Windows is unable to start the requested task, the desired action will not be taken.  If the calling program has not been coded to account for this condition, you will not receive an error message.  Instead it will appear as if the system ignored your request.

This is the same problem as in the previous case except that there is no error message.  In the previous case Windows Program Manager has been coded to display the Insufficient Memory error message.

3) Specific Programs will not Load

Only specific types of programs require more than 512 bytes of Windows DOS Memory.  If there isn't enough Windows DOS Memory, then these programs will not load.

To test this condition, try loading a program that does not need Windows DOS Memory such as Clock or Notepad.  If these programs will load but others won't, there is a good chance the other programs need additional Windows DOS Memory.

4) Programs need to Load in a Particular Order

This is a common situation where if you load Program A before Program B, Program B will not load.  However, if you load Program B before Program A, both will load.

This condition is caused when Program A uses enough fixed memory to cause an insufficient Windows DOS Memory condition when Program B loads.

Note: You cannot use the DOS "MEM" command to determine the amount of free Windows DOS Memory.  MEM is a DOS program which can only report on the amount of free memory in a DOS Virtual Machine.  Windows DOS Memory is associated with the Windows Virtual Machine.  Because the use of Low Memory in one virtual machine has no impact on other virtual machines, the MEM command is unable to report on memory usage by Windows based aplications.


WinMiser Setup Index

Introduction
Source Files
Destination Files
SYSTEM.INI Backup File
Installation
Program Group
Completion


WinMiser Setup Introduction

The WinMiser setup program can be used to install WinMiser on your system.  The installation process consists of the following steps:

1) Copying the WinMiser files from a source path to a destination path.

2) Modifying the Windows SYSTEM.INI file.

3) Adding the WinMiser program group to the Program Manager (optional).

First, the WinMiser setup program prompts you for the source and destination paths.  The selected paths are shown prior to installation processing begining.  Once verified, the WinMiser files are copied if the source and desination paths are not equal.

In either case, the current SYSTEM.INI file is backed up to SYSTEM.WMI, and the SYSTEM.INI file is modified to support WinMiser.  You may change to default SYSTEM.INI backup file name.

Next, you are prompted to add the WinMiser program group.  If you select this option, the WinMiser program group will be added to the Progam Group.

The WinMiser setup program will display a message box if it encounters any errors during the setup process.

Select the Continue button to procede with the installation.
Select the Exit button to exit the WinMiser setup program without installing WinMiser.
Select the Help button to display this Help panel.


WinMiser Setup Source Path

The WinMiser Setup Source Path dialog is used to specify the location of the WinMiser source files.  The default value is the path where the setup program is located.  You may change this value to any valid path which contains the WinMiser source files.  An error will be displayed if the setup program can not find the source path or if can not find all of the WinMiser source files.

The WinMiser source files are:

WINMISER.DLL
MISERNAG.EXE
MISERDRV.DLL
WINMISER.WRI
ORDERFRM.WRI
WINMISER.HLP
SETUP.EXE
UNINST.EXE
MISERUNI.EXE
README.TXT

Select the Continue button to accept the specified Source Path and procede with the installation.
Select the Back button to display the Registration dialog.
Select the Exit button to exit the WinMiser setup program without installing WinMiser.
Select the Help button to display this Help panel.


WinMiser Setup Destination Path

The WinMiser Setup Destination Path dialog is used to specify the path where you want to install WinMiser.  The WinMiser source files will be copied to the specified destination path.  You may specify any valid path name.

The initial default path is C:\MISERSHW.  After WinMiser has been installed, the current WinMiser path is the default path.

If the specified path does not exist, you will be prompted to add the new path.  If the specified path is invalid, you must enter a valid destination path.

Select the Continue button to accept the specified Destination Path and procede with the installation.
Select the Back button to change the source path.
Select the Exit button to exit the WinMiser setup program without installing WinMiser.
Select the Help button to display this Help panel.


WinMiser Setup SYSTEM.INI Backup File

The WinMiser Setup SYSTEM.INI Backup File dialog is used to specify the file name to be used to save a backup copy of your current SYSTEM.INI file.  The WinMiser setup program modifies you Windows SYSTEM.INI file.  In case WinMiser fails to operate properly, it is helpfull to have a backup copy of your current SYSTEM.INI file.

By default, WinMiser will create a file named SYSTEM.WMI in your Windows directory.  You may use this dialog to change the default value to any valid file name.

WinMiser will display a message if the specified file already exists.  You may ignore this warning and reuse the existing file or specify a new file name.

Select the Continue button to accept the specified Backup File Name and procede with the installation.
Select the Back button to change the desintation path.
Select the Exit button to exit the WinMiser setup program without installing WinMiser.
Select the Help button to display this Help panel.


WinMiser Setup Installation

The WinMiser Setup Installation dialog is used to verify the installation options before proceeding.  The selected source and destination paths and SYSTEM.INI backup file name are shown at the bottom of the dialog.

Select the Continue button to procede with the installation.  If the source and destination paths are different the WinMiser files will be copied.  In either case, the setup program will copy the current SYSTEM.INI and make the necessary changes to support WinMiser.

Select the Back button to change either of the selected paths.
Select the Exit button to exit the WinMiser setup program without installing WinMiser.
Select the Help button to display this Help panel.


WinMiser Setup Program Group

The WinMiser setup Program Group dialog is used to specify if you wish to create a WinMiser program group.  The WinMiser program group can be used to execute the WinMiser programs.  Check the box to add the WinMiser program group.  Uncheck the box to procede without adding the WinMiser program group.

The following programs will be added to the WinMiser program group.

WinMiser Shareware
WinMiser Help
WinMser Order Form
WinMiser Uninstall
WinMiser ReadMe

Select the Continue button to procede with the installation.
Select the Exit button to exit the WinMiser setup program without installing WinMiser.
Select the Help button to display this Help panel.


WinMiser Setup Completion

Once the WinMiser setup process is complete, you have the option to restart Windows.  Because WinMiser requires changes to the SYSTEM.INI file, Windows must be restarted before you can use WinMiser.

Select the Restart Windows button to restart Windows from the setup program.
Select the Return to Windows button to exit the setup program and return to Windows.
Select the Help button to display this Help panel.


WinMiser Uninstall Index

Introduction
SYSTEM.INI Backup File
Removal
Completion


WinMiser Uninstall Introduction

The WinMiser uninstall program can be used to remove WinMiser from your system.  The uninstall process consists of the following steps:

1) Deleting the WinMiser files from the WinMiser directory and removing the directory if empty.

2) Modifying the Windows SYSTEM.INI file.

3) Deleting the WinMiser program group from the Program Manager.

The current SYSTEM.INI file is backed up to SYSTEM.WMU, and the SYSTEM.INI file is modified to remove support for WinMiser.  You may change to default SYSTEM.INI backup file name.

The WinMiser uninstall program will display a message box if it encounters any errors during the uninstall process.

Select the Continue button to procede with the uninstall process.
Select the Exit button to exit the WinMiser uninstall program without removing WinMiser.
Select the Help button to display this Help panel.


WinMiser Uninstall SYSTEM.INI Backup File

The WinMiser Uninstall SYSTEM.INI Backup File dialog is used to specify the file name to be used to save a backup copy of your current SYSTEM.INI file.  The WinMiser uninstall program modifies you Windows SYSTEM.INI file.  In case the WinMiser uninstall program fails to operate properly, it is helpfull to have a backup copy of your current SYSTEM.INI file.

By default, WinMiser will create a file named SYSTEM.WMU in your Windows directory.  You may use this dialog to change the default value to any valid file name.

WinMiser will display a message if the specified file already exists.  You may ignore this warning and reuse the existing file or specify a new file name.

Select the Continue button to accept the specified Backup File Name and procede with the uninstall process.
Select the Back button to return to the Welcome dialog.
Select the Exit button to exit the WinMiser uninstall program without removing WinMiser.
Select the Help button to display this Help panel.


WinMiser Uninstall Removal

The WinMiser Uninstall Removal dialog is used to verify the uninstall options before proceeding.  The WinMiser directory and SYSTEM.INI backup file name are shown at the bottom of the dialog.

Select the Continue button to procede with the uninstall process.  The uninstall program will copy the current SYSTEM.INI and make the necessary changes to remove WinMiser.  It will also delete all WinMiser files and remove the WinMiser group from the program manager.

Select the Back button to change the backup file name.
Select the Exit button to exit the WinMiser uninstall program without removing WinMiser.
Select the Help button to display this Help panel.


WinMiser Uninstall Completion

Once the WinMiser uninstall process is complete, you have the option to restart Windows.  Because WinMiser requires changes to the SYSTEM.INI file, Windows must be restarted to remove all of the WinMiser drivers.

Select the Restart Windows button to restart Windows from the uninstall program.
Select the Return to Windows button to exit the uninstall program and return to Windows.
Select the Help button to display this Help panel.


Glossary Index

WinMiser Glossary

C
Conventional Memory

D
Device Drivers
DLL
DOS
Dynamic Link Library

E
EMM386.EXE
EMS
Expanded Memory
Extended Memory

F
Fixed Memory

G
GDI
GDI Memory
GDI String Memory
Global DOS Memory
Global Memory

H
High Memory Area
HIMEM.SYS

L
Linear Memory
Local Memory
Locked Memory
Low Memory

M
Moveable Memory

P
Page Tables
Paging
Physical Memory
Protected Mode

R
RAM
Real Mode

S
SVM
Swap File
System Virtual Machine

T
TSR

U
UMB
Upper Memory Block
USER
User Memory
User Menu Memory
User Menu Item Memory
User String Memory

V
Virtual Machine
Virtual Memory
VM

W
Windows
Windows DOS Memory
Windows Virtual Machine

X
XMS


Conventional Memory
Convetional Memory is the lowest 640K bytes in memory.  It is critical to DOS and Windows because Real Mode programs can only address memory in this area.


Device Drivers
Device Drivers are programs designed to add functionality to the base PC system configuration.  Rather than have every PC support all types of hardware, additional components can be supported by adding the proper device driver.

For example, if you add a CD ROM drive to your PC, you need to add a device driver that knows how to communicate with your specific CD ROM drive.  This technique of adding device drivers allows your PC to be customized to meet your needs.


DLL
Windows uses Dynamic Link Libraries (DLLs) as a method of supporting shared program code.  Programmers place common functions in DLLs so they can be shared by multiple applications.  This provides modularity as well as reduced memory usage.


DOS
DOS is the Real Mode operating system which Windows Version 3.1 runs on.


EMM386.EXE
EMM386.EXE is a program provided with DOS and Windows to provide both Expanded Memory and support for Upper Memory Block usage.


Expanded Memory
Expanded Memory (EMS) is a method of providing more memory for programs to use under DOS.  It was originally designed to work with an expanded memory card.  Memory was swapped between a 64K byte region in the Upper Memory Block and memory on this card.  Now programs such as EMM386.EXE and Windows provide expanded memory compatibility by using Extended Memory.


Extended Memory
Extended Memory (XMS) is the range of memory above 1 megabyte.  The original PC could only address 1 megabyte of memory.  This limitation was removed starting with the 80286 processor.  However, to access this memory directly, the processor must be running in Protected Mode.  While programs written for Real Mode such as DOS, can not access this memory directly, they can access extended memory indirectly with the help of programs like HIMEM.SYS.  Progams written for Protected Mode such as Windows based programs can access this memory directly.


Fixed Memory
Fixed Memory is a Global Memory object that was allocated not to move in Linear Memory.  It is used by programs that need to be sure the memory is at the same linear address and not moved to the Swap File.


GDI
GDI is a component of Windows that supports graphics features.


GDI Memory
GDI Memory is memory used by the Windows GDI DLL to store graphics information.  It is a critical memory area because it is shared by all Windows based programs and is limited to 64K bytes.  It is used to store information about Pens, Brushes, Fonts, Bitmaps, Regions, and other graphical objects.


GDI String Memory
GDI String Memory is memory used by the Windows GDI DLL to store character string information.  It is a critical memory area because it is shared by all Windows based programs and is limited to 64K bytes.  It is used to store character string information needed by GDI.


Global DOS Memory
Global DOS Memory is another term for Windows DOS Memory.


Global Memory
Global Memory is the memory allocated to the System Virtual Machine.  It is the memory space used by all Windows based programs.  Windows has a limit of 8192 Global Memory objects.


High Memory Area
The High Memory Area (HMA) is the 64K byte memory range just above 1 megabyte.  On the original PC this area did not exist because PCs had less than 1 megabyte of memory.  On newer PCs with Extended Memory, this memory area does exist.  It is a special area because it is the only portion of Extended Memory that is directly addressable by Real Mode programs.  It is typically used to store a portion of DOS using the command "DOS=HIGH" in CONFIG.SYS.


HIMEM.SYS
HIMEM.SYS is a program that is used to execute the PC in Protected Mode.


Linear Memory
Linear Memory is the entire 4 gigabyte address space that can be addressed by Virtual Memory.  It is addressed using Page Tables.  Because 4 gigabytes is more memory than is needed by most systems, a majority of the linear address space is not mapped with Page Table entries.


Local Memory
Local Memory is a subset of a Global Memory object.  Programs use local memory objects to store small items because there are a limited number of Global Memory objects.  Under Windows 3.1 local memory is limited to 64K bytes.


Locked Memory
Locked Memory is a Global Memory object that has been locked so that it will not be moved in Linear Memory.  It is used by programs that need to be sure the memory is at the same linear address and not moved to the Swap File.


Low Memory
Low Memory is another term for Windows DOS Memory.


Moveable Memory
Moveable Memory is a Global Memory object that Windows can move in Linear Memory.  Moveable Memory can be moved to the Swap File when Windows can no longer allocate Global Memory.


Page Tables
Page tables are used by Windows to support Virtual Memory.  Linear Memory is divided into 4K byte pages.  Each page is referenced by an entry in a page table.  This reference contains the information needed by Windows to locate the memory addressed by this page.


Paging
Paging is a process used by Windows to support Virtual Memory.  When all Physical Memory has been allocated,  Windows can move 4K byte pages of memory to the Swap File.


Physical Memory
Physical Memory is the memory provided by RAM chips on your PC.  Typical PCs have between 4 and 16 megabytes of physical memory.


Protected Mode
Protected Mode is one of two execution modes of the 80x86 processor, the other is Real Mode.  Windows uses the Protected Mode features to address more then 1 megabyte of memory.


RAM
RAM or Random Access Memory is Physical Memory on your PC that is used by the processor to temporarily store programs and data.  Physically RAM consists of a number of chips designed to store binary data.


Real Mode
Real Mode is one of two execution modes of the 80x86 processor, the other is Protected Mode.  It is mainly used for compatibility with the original 8088 processor.  The most important feature of Real Mode is that only 1 megabyte of memory can be addressed in this mode.  This is what leads to Conventional Memory and Windows DOS Memory shortages.


Swap File
The swap file is used by Windows to support Virtual Memory.  The disk space assigned to the swap file is combined with Physical Memory to provide Windows virtual address space.  The size of the swap file can be set using the 386 Enhanced icon under control panel.


System Virtual Machine
The System Virtual Machine to the Virtual Machine where all Windows based programs execute.


TSR
A TSR or Terminate and Stay Resident program is a DOS program that loads and then stays active in the backgound of your PC.  They are typically used to add background functionality such as print or network support.


Upper Memory Block
The Upper Memory Block (UMB) is the 384K byte region of memory between 640K and 1 megabyte.  When the original PC was designed, this memory area was set asside to be used by hardware components such as the video drivers.  The demand for Conventional Memory has lead to portions of this memory to be used by device drivers and TSR programs.  Programs such as EMM386.EXE are designed to allow free memory in the UMB range to be used by these system programs.


USER
USER is a component of Windows that supports window display features.


User Memory
User Memory is memory used by the Windows USER DLL to store windowing information.  It is a critical memory area because it is shared by all Windows based programs and is limited to 64K bytes.  It is used to store information about all window objects.


User Menu Memory
User Menu Memory is memory used by the Windows USER DLL to store window menu information.  It is a critical memory area because it is shared by all Windows based programs and is limited to 64K bytes.  It is used to store currently available window menus.


User Menu Item Memory
User Menu Item Memory is memory used by the Windows USER DLL to store window menu item information.  It is a critical memory area because it is shared by all Windows based programs and is limited to 64K bytes.  It is used to store currently available window menu items.


User String Memory
User String Memory is memory used by the Windows USER DLL to store character strings.  It is a critical memory area because it is shared by all Windows based programs and is limited to 64K bytes.  It is used to store character strings that are accessable to all programs.


Virtual Machine
Windows executes programs in separate areas called Virtual Machines.  All Windows based programs execute under the System Virtual Machine.  All DOS based programs execute under a separate Virtual Machine.


Virtual Memory
Virtual Memory is a memory allocation technique used by Windows that allows the PC to store more information than it has Physical Memory to support.  To support virtual memory, memory addresses used by programs point to Page Tables instead of Physical Memory addresses.  These Page Tables contain the information needed by Windows to find the Physical Memory associated with a virtual memory address.  Windows combines Physical Memory with Swap File space to create its virtual memory space.  Thus you can increase the Windows virtual memory space by adding more Physical Memory or by defining a larger Swap File.  This allows you to run more programs with less Physical Memory.


Windows
For ease of reading, "Windows" is used in this document to refer to the Microsoft Windows operating system.  Windows is a trademark of Microsoft Corporation.


Windows DOS Memory
Windows DOS Memory is the range of Linear Memory in the System Virtual Machine that can be mapped to Conventional Memory.  It is a critical memory area because it is limited in size (less than 640K bytes), and is required by all Windows based applications.  It is also refered to as Low Memory or Global DOS Memory.  This document uses the term Windows DOS Memory to distinguish it from this linear address range in other Virtual Machines.


Windows Local Memory
Windows uses 6 local memory areas to support common functions.  These memory areas are called User Memory, GDI Memory, User Menu Memory, User Menu Item Memory, User String Memory, and GDI String Memory.  It is important to keep track of the memory allocated in these areas because they are limited to less than 64K bytes.  Programs will either not start or behave erractically if one of these memory areas is over allocated.


Windows Virtual Machine
Windows Virtual Machine is another term for the System Virtual Machine.