Microsoft KB Archive/96759

= No Expanded Memory Available After Installing EMM386.EXE =

Article ID: 96759

Article Last Modified on 7/7/2005

-

APPLIES TO


 * Microsoft MS-DOS 5.0 Standard Edition
 * Microsoft MS-DOS 5.0a
 * Microsoft MS-DOS 6.0 Standard Edition
 * Microsoft MS-DOS 6.2 Standard Edition
 * Microsoft MS-DOS 6.21 Standard Edition
 * Microsoft Windows 3.0 Standard Edition
 * Microsoft Windows 3.0a
 * Microsoft Windows 3.1 Standard Edition
 * Microsoft Windows 3.11 Standard Edition

-



This article was previously published under Q96759



SYMPTOMS
After you install EMM386.EXE to provide access to the upper memory area (UMA), Microsoft Windows versions 3.0 and 3.1 no longer provide expanded memory to your MS-DOS-based applications.

If expanded memory is no longer provided, your MS-DOS-based applications may exhibit some of the following common symptoms:


 * When you start an MS-DOS-based application from within Windows, the application displays an &quot;Out of Memory&quot; message and then quits.
 * When you start an MS-DOS-based application from within Windows, the application behaves erratically, and displays &quot;Out of Memory&quot; messages when you try to perform certain functions.
 * Windows stops responding (hangs) when you start some MS-DOS-based applications, but you can start and run other MS-DOS-based applications without any problems.



CAUSE
The DEVICE command line for EMM386.EXE contains the NOEMS switch, which tells EMM386.EXE and Windows not to provide expanded memory to MS-DOS-based applications.



WORKAROUND
To correct this problem, edit your CONFIG.SYS file so that the DEVICE command for EMM386.EXE uses the RAM switch instead of the NOEMS switch. Procedure 1 explains how to do this. After you complete Procedure 1, if some of your memory-resident programs or device drivers fail to load into upper memory blocks (UMBs), continue with Procedure 2 and, if necessary, Procedure 3.

NOTE: In the following three procedures, c represents your hard disk drive.

Procedure 1: Changing the DEVICE Command
To use the RAM switch instead of the NOEMS switch, follow these steps:

 Use a text editor to open your CONFIG.SYS file. To edit the file using MS-DOS Editor, type the following at the MS-DOS command prompt, and press the ENTER key:

edit c:\config.sys

  Locate the DEVICE command for EMM386.EXE. It should look similar to the following:      device=c:\dos\emm386.exe noems   Substitute RAM for NOEMS. The corrected DEVICE command for EMM386.EXE should look similar to the following:      device=c:\dos\emm386.exe ram  Save your CONFIG.SYS file and quit the text editor. If you are using MS-DOS Editor, choose Exit from the File menu. When MS-DOS Editor displays a dialog box prompting you to save your file, choose the Yes button or press ENTER. Restart your computer by pressing CTRL+ALT+DEL.</li> Start Windows and try to reproduce the problem. If your application runs normally, using the NOEMS switch caused the problem and replacing it with the RAM switch corrected it. If the problem still occurs, call Microsoft Product Support Services for further assistance.</li></ol>

After you finish this procedure, you may find some programs or device drivers now fail to load into UMBs. If so, continue with Procedure 2.

To see if your programs and device drivers successfully loaded into UMBs, type the following at the MS-DOS command prompt and press ENTER:

mem /c | more

This command displays the contents of your computer's conventional and upper memory, and shows where each program is running in memory. (For more information about the MEM /C command and UMBs, see page 320 of the Microsoft MS-DOS &quot;User's Guide and Reference&quot; for MS-DOS 5.0. If you are using MS-DOS 6.0 or 6.2, type HELP at the MS-DOS command prompt.)

Procedure 2: Making More Room in the UMA
Certain address ranges in the UMA are normally reserved for use by hardware adapters. EMM386.EXE usually ignores these ranges and does not use them for UMBs. On most systems, however, adapters do not use all the reserved address ranges. You can instruct EMM386.EXE to use these empty address ranges, thereby increasing the number of programs and device drivers that you load into UMBs.

If you have MS-DOS 6.0 or 6.2, you can use the MemMaker program to maximize EMM386.EXE's use of the UMA. To do so, use the following steps:

<ol> To start MemMaker, type the following at the MS-DOS command prompt and then press ENTER:

memmaker

</li> When you are prompted to choose express or custom setup, choose Custom Setup.</li> When you are asked if you use any programs that need expanded memory, choose Yes.</li>  In the Advanced Options screen make the following choices: <pre class="fixed_text">  Specify which drivers and TSRs to include in   optimization? box,                                  No

Scan the upper memory area aggressively? Yes

Optimize upper memory for use with Windows? No

Use monochrome region (B000-B7FF) for running       No programs?

Keep current EMM386 memory exclusions and           Yes inclusions?

Move Extended BIOS Data Area from conventional      Yes to upper memory? NOTE: If your computer does not have a monochrome monitor, choose Yes in response to the question &quot;Use monochrome region (B000-B7FF) for running programs?&quot; </li> After MemMaker restarts your computer the last time, type the following command at the MS-DOS prompt and then press ENTER:

mem /c | more

If your programs and device drivers are running in UMBs, and your MS-DOS-based application works properly and is receiving the expanded memory it needs, you have corrected the problem. If not, continue with Procedure 3.</li></ol>

If you have MS-DOS 5.0, use the following steps to configure EMM386.EXE's use of the UMA:

<ol> Create an MS-DOS 5.0 startup disk. To do so, insert a formatted floppy disk in drive A, type the following at the MS-DOS command prompt, and press ENTER:

sys c: a:

</li> Copy your CONFIG.SYS file to the startup disk by typing the following:

copy c:\config.sys a:\

</li> Use a text editor to open your original CONFIG.SYS file. To edit the file using MS-DOS Editor, type the following at the MS-DOS command prompt and press ENTER:

edit c:\config.sys

</li> Locate the DEVICE command for EMM386.EXE, and insert the i switch before the RAM switch. The i switch instructs EMM386.EXE to use an address range in the UMA for UMBs. The value you specify for the i switch depends on your computer and monitor type.

NOTE: In the following examples, hexadecimal addresses consist of the letters A-F and numbers. All &quot;0&quot;s represent zeros, not letters.

<ul>  If your computer has a monochrome monitor but is not an IBM(R) PS/2(R), add the i=E000-EFFF switch before the RAM switch, as follows: <pre class="fixed_text">        device=c:\dos\emm386.exe i=E000-EFFF ram </li>  If your computer is an IBM PS/2 but does not have a monochrome monitor, add the i=B000-B7FF switch before the RAM switch, as follows: <pre class="fixed_text">        device=c:\dos\emm386.exe i=B000-B7FF ram </li>  If your computer is not an IBM PS/2 and does not have a monochrome monitor, add the i=E000-EFFF and the i=B000-B7FF switches before the switch, as follows: <pre class="fixed_text">        device=c:\dos\emm386.exe i=E000-EFFF i=B000-B7FF ram </li> If your computer is an IBM PS/2 with a monochrome monitor, skip to Procedure 3.</li></ul> </li> Save your changes and exit the text editor. If you're using MS-DOS Editor, choose Exit from the File menu. When MS-DOS Editor displays a dialog box prompting you to save your file, choose the Yes button or press ENTER.</li> Restart your computer by pressing CTRL+ALT+DEL.

If your computer fails when you start it, the memory range you specified for EMM386.EXE is probably being used by hardware adapters. In this case, insert your startup disk in drive A and restart your computer. Then, edit your CONFIG.SYS file and remove the i switch(es) you added to the DEVICE command for EMM386.EXE. Call Microsoft Product Support Services for further assistance.</li> <li>After your computer restarts, see if your programs successfully loaded into UMBs by typing the following at the MS-DOS command prompt and then pressing ENTER:

mem /c | more

You have corrected the problem if your programs and device drivers are running in UMBs and your MS-DOS-based application still works properly and is receiving the expanded memory it needs. If you still cannot load programs into UMBs, continue with Procedure 3.</li></ol>

Procedure 3: Reducing the Space Allocated for Expanded Memory
If you start EMM386.EXE with the RAM switch and programs or device drivers do not load into UMBs when your computer starts, your system may not have enough UMBs to run those programs or device drivers. The RAM switch sets aside 64 kilobytes (K) of the UMA as a page frame for use with expanded memory. The remaining UMBs may not be large enough to run your programs, even if you were able to include additional addresses by following Procedure 2. In such cases, you can instruct EMM386.EXE to reduce the 64K page frame to 16K, making more UMBs available.

NOTE: Use this procedure only if your applications use expanded memory according to the Lotus-Intel-Microsoft Expanded Memory Specification (LIM EMS) version 4.0. Applications that follow the LIM EMS version 3.2 need the full 64K page frame, and cannot use expanded memory if you follow this procedure. If you are not sure which LIM EMS version your application needs, contact your application manufacturer.

To reduce the size of the 64K page frame and increase the number of available UMBs, use the following steps:

<ol> <li>Type EMM386 at the MS-DOS command prompt and press ENTER:

EMM386.EXE displays information about its current memory management activities. Locate the line that reads &quot;Page frame segment&quot; and write down the hexadecimal address that appears on that line. In the following example, the page frame segment address starts at E000:

Page frame segment. . . . . . . . . E000 H

</li> <li>Use a text editor to open your original CONFIG.SYS file. To edit the file using MS-DOS Editor, type the following at the MS-DOS command prompt and press ENTER:

edit c:\config.sys

</li> <li> Locate the DEVICE command for EMM386.EXE, and insert the P0 switch before the RAM switch. The P0 switch should specify the address you noted in step 1. For example, if the page-frame segment address starts at E000, the DEVICE command appears similar to the following: <pre class="fixed_text">     device=c:\dos\emm386.exe p0=E000 ram NOTE: In the P0=E000 switch, the 0s are zeros. </li> <li>Save your changes and quit the text editor. If you are using MS-DOS Editor, choose Exit from the File menu. When MS-DOS Editor displays a dialog box prompting you to save your file, choose the Yes button or press ENTER.</li> <li>Restart your computer by pressing CTRL+ALT+DEL.

If your computer fails when you start it and you have MS-DOS 5.0, insert your startup disk in drive A and restart your computer. Edit your CONFIG.SYS file and remove the P0 switch you added to the DEVICE command for EMM386.EXE. Then, save the file, restart your computer, and repeat Procedure 3. Be sure to carefully note the page-frame segment address.

If your computer fails when you start it and you have MS-DOS 6.0 or 6.2, restart your computer and press the F8 key. When you are asked if you want to load EMM386.EXE, choose No. Edit your CONFIG.SYS file and remove the P0 switch you added to the DEVICE command for EMM386.EXE. Then, save the file, restart your computer, and repeat Procedure 3. Be sure to carefully note the page-frame segment address.</li> <li>After your computer starts, see if your programs were successfully loaded into UMBs by typing the following at the MS-DOS command prompt and then pressing ENTER:

mem /c | more

</li></ol>

You have corrected the problem if your programs and device drivers are running in UMBs and your MS-DOS-based applications still work properly and are receiving the expanded memory they need.

If your programs and device drivers still do not load into UMBs, it is possible that your system simply does not have enough UMBs available to run those programs. See your hardware documentation for information about which addresses in the UMA are in use, or call Microsoft Product Support Services for further assistance.

If your applications do not seem to be receiving the expanded memory they need, they may require LIM EMS version 3.2. If this is the case, you should remove the P0 switch.

<div class="references_section">

MS-DOS 5.0
For more information about the &quot;MEM /C&quot; command and UMBs, see page 320 of the Microsoft MS-DOS &quot;User's Guide and Reference&quot;.

For more information about EMM386.EXE and its startup parameters, see pages 605-609 of the Microsoft MS-DOS &quot;User's Guide and Reference.&quot;

MS-DOS 6.0
Type help at the MS-DOS command prompt and search on Mem, Emm386, or EMM386.EXE.

Also
Microsoft Windows &quot;User's Guide&quot; explains how to use Windows program information files (PIFs) to provide expanded memory to MS-DOS-based applications.

Additional query words: appnote 6.00 5.00 5.00a dos 6.20

Keywords: KB96759

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.