Prevent the Windows 'Insufficient Memory' Error

  • Smaller Small Medium Big Bigger
  • Default Helvetica Segoe Georgia Times

When you try to run many programs at the same time in Windows, you can get the “Insufficient memory to run application” error. You might be able to work around this condition by altering the order in which you start programs. But sometimes, there might be nothing you can do to load the combination of programs you want.

Item number R1365 in IBM’s Client Access/400 web page Knowledge Base (see the related article in this issue of Client Access/400 Expert) describes two utility programs that might help with this condition. Using the instructions in the article, I downloaded the utilities and tried them on my system. I’ll describe how you can get the utilities, configure them, and test them on your system.

The Problem Being Solved

As explained in the IBM document and in documentation for the utilities, the problem is that Windows cannot prevent programs from loading into low (con-ventional) DOS memory. After Windows loads, all of the remaining conventional memory is considered to be in Windows’ Global Heap. When you load a Windows program or DLL that requests fixed memory blocks, Windows allocates memory to the program or DLL from the Global Heap. Although some programs require that they be loaded into the conventional memory (such as network device drivers), most Windows programs and DLLs will work in the large pool of extended memory (memory above 1MB).

You can’t change the program’s fixed attribute, so you’ll need some other technique to get those programs to load into extended memory. The utilities described here provide the mechanism to force the programs out of conventional memory.

The 1MBFORT Utility

This utility originally appeared in the March 29, 1995, issue of PC Magazine (Ziff- Davis). To obtain the utility, you can use any of the methods described in Figure 1. The utility is provided as a ZIP file, which I unzipped with the PKUNZIP program.

There are several files in the ZIP file. The two executable programs that you will work with are 1MBFORT.EXE and VIEW1MB.EXE. The 1MBFORT program is loaded either in the Windows Startup group or in a Load= line in the WIN.INI file. The VIEW1MB program displays the programs using low memory and the available free blocks. Figure 2 shows a sample of the VIEW1MB display on the desktop.

According to the documentation provided, 1MBFORT works by fragmenting the lower memory area into blocks. The default block size is 10,240 bytes. You can set the block size from 5,000 to 20,000 bytes. When Windows loads a program or DLL, it will be unable to find a large enough block of contiguous lower memory, so it will load the program or DLL into extended memory.

The FIX1MB Utility

This utility was originally published in the May 1995 issue of Microsoft Systems Journal (Miller Freeman, Inc.). The utility is available from the sources shown in Figure 3. If possible, you should try to obtain the article describing the utility (Windows Q&A, by Matt Pietrek), as it goes into great detail about the cause of the Windows memory problem.

The file that you download is a self-extracting archive, containing other self- extracting archives. The utility and related files are contained in archive WQA0595.EXE. The files for the utility are FIX1MB.EXE, FX1MBDLL.DLL, and PROCHOOK.DLL.

I started Windows, then started the utility (FIX1MB.EXE). This presents the display shown in Figure 4. This display is different from the 1MBFORT display in that the currently loaded programs are sorted in descending order by memory use, and programs that you can’t influence (such as the Windows kernel and USER programs) are not shown in the list. Figure 5 shows the Help screen provided with the utility.

You can install the FIX1MB utility so that it loads from the Windows SYSTEM.INI file by clicking the command button shown in Figure 4.

FIX1MB uses a very different approach than 1MBFORT for controlling memory. The program monitors Windows load operations as they occur. Some conventional memory is always required for a program (512 bytes for the DOS Program Segment Prefix, or PSP). FIX1MB grants the request. However, FIX1MB then makes additional conventional memory unavailable to the program as it is loading, forcing it to load into extended memory.

The article describes the use of the “Worst case mode” check box. Checking this box increases the granularity of the utility’s memory allocation. However, this causes programs to load more slowly. If you try this utility, you can experiment with this check box to see if you can squeeze more programs into memory.

Windows System Resources

Regardless of the help provided by the utilities, I found that there are still limits to the number of programs I can start at one time. The desktops shown in Figures 2 and 4 are typical of the load I was able to start. I’m not complaining; the three Microsoft Office components are rather large programs to load.

In other tests, I was able to load Word, six instances of the PC5250 emulator, the PC5250 print function, and some DOS sessions.

The limiting factor seems to be the availability of Windows System Resources. Figure 6 shows how to check the percentage available of system resources

(from the Program Manager, Help:About Program Manager menu item). Each PC5250 session takes 3 to 5 percent of system resources. Excel took an astonishing 40 percent of system resources. The utilities do not help with this problem, which will also prevent you from launching applications.

Tuning Your Configuration

You can use either utility to help tune your configuration. Of the two, the FIX1MB utility may be easier to work with because it provides more detail about the applications using memory.

For example, Figure 4 shows the list of DLLs, drivers, and programs that are active while Windows is running. The first program in the list is the Windows multimedia DLL, which is using at least 32KB of memory (it also uses another 4KB of memory, shown as the fifth entry in the list). If I were not using the sound features of Windows, I could go into the SYSTEM.INI or WIN.INI files, or the Control Panel, and remove or comment out the multimedia drivers. Although it can be difficult to recognize a function just from the program name, you might be able to match up the names listed in the utility with sections of the SYSTEM.INI or WIN.INI files.

You will especially want to look for unused drivers, possibly left over from old versions of programs. Every driver, DLL, and unused EXE that you remove from the list of programs that Windows loads increases the chances that you will be able to load more of the programs that you need to work with.

CompuServe: GO ZIFFMEM Internet: FTP server:

Log-in name: anonymous Log-in password: (your e-mail address) archive: /pcmag/1995/0328/ Fax/Mail: fax: PC Magazine Utilities, (508) 368-0141 mail: PC Magazine Utilities c/o Image Software Services 55 Green St. Clinton, MA 01510-3099

Figure 1: How to Obtain the 1MBFORT Utility Figure 2: The 1MBFORT Display on the Desktop

CompuServe: GO MSL-1 Internet: FTP server:

Log-in name: anonymous archive: /developr/msj/msjmay95.exe

Prevent_the_Windows_Insufficient_Memory_Error03-00.jpg 450x201

Microsoft Download Service: (206) 936-6735

Figure 3: How to Obtain the FIX1MB Utility Figure 4: The FIX1MB Display on the Desktop Figure 5: The FIX1MB Help Display

Prevent_the_Windows_Insufficient_Memory_Error04-00.jpg 450x233

Prevent_the_Windows_Insufficient_Memory_Error04-01.jpg 450x356

Prevent_the_Windows_Insufficient_Memory_Error05-00.jpg 450x308

Figure 6: Monitoring System Resources