Guide
Diagnosing and Fixing Conventional Memory Exhaustion in MS-DOS
Learn how to diagnose and fix conventional memory exhaustion in MS-DOS by adjusting CONFIG.SYS, loading HIMEM.SYS and EMM386.EXE, and using DEVICEHIGH/LOADHIGH.
Published by Tasadduq Burney
13 Nov 2025, 21:00 UTC
2 min16.5K views0

Recognizable Condition
The system hangs during boot or displays an 'Out of memory' error when launching a program after several device drivers and TSRs have been loaded from CONFIG.SYS.
Cause and Diagnostic Overview
| Cause | Diagnostic Indicator |
|---|---|
| Large drivers (e.g., ANSI.SYS, RAMDRIVE.SYS) consuming conventional memory | Running MEM /C shows conventional memory close to 0 KiB after the drivers load. |
| TSRs loaded before upper memory blocks (UMBs) are available | MEM /D reports high conventional usage and little or no UMB usage. |
Ordered Checks
- Boot the system and press F5 (or F8) to step through CONFIG.SYS lines.
- After each driver loads, run MEM /C from the DOS prompt to record conventional memory free.
- Identify the point where conventional memory drops sharply; note the driver or TSR loaded at that line.
- Check the load order: ensure DEVICE=C:\\DOS\\HIMEM.SYS appears before any DEVICEHIGH lines and before DEVICE=C:\\DOS\\EMM386.EXE.
Fixes Tied to Findings
- Move bulky drivers into upper memory blocks using DEVICEHIGH after HIMEM.SYS and EMM386.EXE are loaded.
DEVICE=C:\\DOS\\HIMEM.SYS DEVICE=C:\\DOS\\EMM386.EXE RAM DEVICEHIGH=C:\\DOS\\ANSI.SYS DEVICEHIGH=C:\\DOS\\RAMDRIVE.SYS 1024 /E - Load TSRs with LOADHIGH (or LH) to keep them out of conventional memory.
LOADHIGH=C:\\DOS\\MOUSE.COM LOADHIGH=C:\\DOS\\KEYB.COM - If EMM386.EXE is used without the RAM switch, add it to enable UMB creation.
DEVICE=C:\\DOS\\EMM386.EXE RAM
Escalation Criteria
If after applying the above changes conventional memory remains below approximately 50 KiB (insufficient for most applications), consider:
- Using a DOS extender (e.g., DOS/4GW) for the target program.
- Migrating to a protected‑mode environment such as Windows 95 or later.
Verification Steps
- Reboot the system normally.
- At the C:\\> prompt, run MEM /C and note the 'Free Conventional Memory' value; it should be comfortably above 100 KiB.
- Run MEM /D to confirm that UMBs are being used (non‑zero 'Upper memory' and 'Reserved' values).
- Launch the program that previously failed; it should start without an 'Out of memory' message.
Rollback Procedure
- Boot with step‑by‑step confirmation (F5/F8) and decline the modified CONFIG.SYS lines.
- Alternatively, rename the edited CONFIG.SYS to CONFIG.SYS.new and restore the original CONFIG.SYS from a backup.
- Reboot and verify with MEM /C that conventional memory returns to its previous low value, confirming the change was reverted.
0 replies
A thoughtful contribution can make all the difference. Be the first to share one.