Ad Space — Top Banner

Insufficient memory

Microsoft MS-DOS

Severity: Moderate

What Does This Error Mean?

Insufficient memory means the program needs more conventional memory (the first 640KB) than is currently free. TSR programs, drivers, and DOS itself consume conventional memory. Free up memory by removing TSRs and loading drivers into upper memory.

Affected Models

  • MS-DOS 3.x
  • MS-DOS 4.x
  • MS-DOS 5.x
  • MS-DOS 6.x
  • PC-DOS
  • FreeDOS
  • DOSBox

Common Causes

  • Too many TSR (Terminate and Stay Resident) programs loaded
  • Device drivers in CONFIG.SYS consuming conventional memory
  • DOS itself and COMMAND.COM using memory that the program needs
  • Program simply requires more than 640KB (some games need expanded or extended memory)
  • In DOSBox: memsize setting too low for the program

How to Fix It

  1. Type MEM and press Enter to see how much conventional memory is free.

    MEM shows total, used, and free conventional memory. Most DOS programs need at least 500-580KB free. If free memory is below 500KB, you need to unload some TSRs or drivers.

  2. Create a boot disk or boot menu that loads minimal drivers.

    Many games came with instructions to boot from a clean floppy. A boot disk with a minimal CONFIG.SYS and AUTOEXEC.BAT gives maximum free memory.

  3. Use LOADHIGH (LH) in AUTOEXEC.BAT to load TSRs into upper memory.

    LH MOUSE.COM loads the mouse driver into upper memory (between 640KB and 1MB) instead of conventional memory. This requires DOS=UMB in CONFIG.SYS and EMM386.EXE loaded.

  4. Use DEVICEHIGH in CONFIG.SYS to load device drivers into upper memory.

    Replace DEVICE= with DEVICEHIGH= for each driver in CONFIG.SYS. This moves drivers like ANSI.SYS and SETVER.EXE out of conventional memory.

  5. In DOSBox: increase the memsize setting in dosbox.conf.

    Open dosbox.conf and find memsize under [dosbox]. Set memsize=16 or memsize=32 for programs that need extended memory. For conventional memory issues, DOSBox already provides a full 640KB.

Frequently Asked Questions

Why does DOS only have 640KB of conventional memory?

When IBM designed the original PC in 1981, they reserved the memory space from 640KB to 1MB for hardware and ROM. This 640KB limit became a permanent constraint that haunted DOS users for over a decade.

What is the difference between conventional, upper, expanded, and extended memory?

Conventional memory is 0-640KB — where DOS programs run. Upper memory is 640KB-1MB — used for loading drivers with LOADHIGH. Expanded memory (EMS) is bank-switched memory accessed through a 64KB window. Extended memory (XMS) is memory above 1MB, used by newer programs and Windows.