Extended Memory: What It Is and How It Works
In this article
Extended memory is the memory above 1 MB in an IBM PC or compatible system, first introduced with the Intel 80286 processor in 1982. It is not the same as expanded memory (EMS), which is a separate, bank-switched scheme. Extended memory is simply the RAM that exists beyond the 1 MB address limit of the original 8086/8088 CPUs, and it requires the CPU to operate in protected mode to access it directly. In modern computers, all RAM is effectively extended memory, but the term is mostly historical now.
Background: Why the 1 MB Limit?
The original IBM PC (1981) used the Intel 8088 processor, which could address only 1 MB of memory (20-bit address bus). Of that 1 MB, the top 384 KB (from 640 KB to 1024 KB) was reserved for system hardware: video memory, ROM BIOS, and expansion card ROMs. That left 640 KB for user programs, which became the famous “640 KB barrier.”
When Intel introduced the 80286 in 1982, it had a 24-bit address bus, allowing up to 16 MB of physical memory. But to maintain compatibility with existing software, the 80286 ran in two modes: real mode (which mimicked the 8086 and was limited to 1 MB) and protected mode (which could access the full 16 MB). The memory above 1 MB in protected mode became known as extended memory.
How Extended Memory Works
In real mode, the CPU can only address the first 1 MB. To use extended memory, the CPU must switch into protected mode. However, early operating systems like DOS were written for real mode, so they could not directly use extended memory. Several software approaches were developed:
- DOS Extenders: These were small programs that switched the CPU into protected mode, allowing DOS applications to access extended memory. Examples include DOS/4G and the CWSDPMI stub used by many DOS games.
- HIMEM.SYS: This is a device driver included with MS-DOS 5.0 and later that provides a consistent API for accessing extended memory. It also manages the High Memory Area (HMA), the first 64 KB of extended memory, which can be accessed in real mode via a quirk of the 80286.
- Protected Mode Operating Systems: OS/2, Windows 3.x in 386 enhanced mode, and later Windows versions run in protected mode and use extended memory as their primary memory pool.
In protected mode, the CPU uses a table of descriptors to map memory segments to physical addresses. This allows each program to have its own protected address space, preventing one program from overwriting another’s memory.
Extended vs. Expanded Memory
Many people confuse extended memory (XMS) with expanded memory (EMS). They are fundamentally different:
- Extended Memory (XMS): Directly addressable memory above 1 MB, accessed via protected mode. It is linear and fast.
- Expanded Memory (EMS): A bank-switching scheme that allows up to 32 MB of memory to be accessed in 16 KB pages through a window in the upper memory area (typically at D000–DFFF). It works even on 8086 CPUs, but it is slower due to the switching overhead.
EMS was popular in the late 1980s for applications like Lotus 1-2-3, but it became obsolete once 386 processors could emulate EMS using extended memory (via EMM386.EXE). Today, the term “expanded memory” is rarely used, while “extended memory” is essentially just RAM.
How to Check and Use Extended Memory
In modern systems, you don’t need to do anything to use extended memory—the operating system manages it automatically. However, if you are using an older DOS environment or a retro PC, you may need to configure memory managers. Here’s a typical setup:
- Install a memory manager like HIMEM.SYS. In MS-DOS, add the line
DEVICE=C:\DOS\HIMEM.SYSto yourCONFIG.SYSfile. - If you need EMS, add
DEVICE=C:\DOS\EMM386.EXE RAMafter HIMEM.SYS. This uses extended memory to simulate expanded memory. - Load DOS into the High Memory Area by adding
DOS=HIGHtoCONFIG.SYS. This frees up conventional memory. - Reboot the computer. You can verify the memory allocation by running the
MEMcommand, which shows conventional, upper, and extended memory totals.
On modern Windows, Linux, or macOS, you can check how much RAM is installed and in use via system settings or tools like Task Manager (Windows), Activity Monitor (macOS), or free command (Linux).
Common Problems and Troubleshooting
When dealing with extended memory, especially on older systems, you might encounter:
- HIMEM.SYS not loaded: If you get an error like “HIMEM.SYS not loaded” or “Missing HIMEM.SYS,” the file may be missing or the path in CONFIG.SYS is incorrect. Verify the file exists and the path is correct.
- Memory conflicts: If two memory managers try to control the same region, you may get crashes or instability. Only load one XMS manager (HIMEM.SYS) and one EMS emulator (EMM386.EXE).
- Protected mode errors: DOS extenders sometimes fail if the CPU is not a 386 or later. Check that your system meets the requirements.
- Windows 3.x “Out of Memory” errors: This often means not enough extended memory is available to Windows. Close other programs, or increase the amount of extended memory allocated to Windows in its settings.
For modern systems, memory problems are usually hardware-related: faulty RAM, incorrect seating, or incompatible modules. Running a memory diagnostic tool like Windows Memory Diagnostic or Memtest86+ can help identify issues.
Why Extended Memory Matters Today
Although the term is historical, the concept is fundamental. Every modern computer uses extended memory—it’s just called RAM. The transition from 16-bit to 32-bit to 64-bit operating systems was driven by the need to address more extended memory. For instance, 32-bit Windows can use up to 4 GB (practically less due to hardware reservations), while 64-bit Windows supports much more.
If you are emulating old DOS games or using vintage hardware, understanding extended memory is essential for configuring memory managers. But for everyday use, you can ignore it—the OS handles it all.
Frequently Asked Questions
Is extended memory the same as RAM?
Yes, in modern systems, the terms are effectively synonymous. RAM is the physical memory, and all of it above 1 MB is extended memory. The term “extended memory” is only meaningful in the context of legacy DOS systems.
How much extended memory can I use?
That depends on your CPU and operating system. The 80286 supports up to 16 MB, the 80386 up to 4 GB, and 64-bit processors support much more (theoretically 16 exabytes, but practical limits are far lower). Your OS will impose its own limits—for example, 32-bit Windows is limited to 4 GB.
Do I need to install HIMEM.SYS on Windows 10?
No. Modern operating systems have their own memory managers built in. HIMEM.SYS is only for DOS and early Windows versions (up to Windows 98/Me).
What is the High Memory Area (HMA)?
The HMA is the first 64 KB of extended memory (from 1 MB to 1 MB + 64 KB). On 80286 and later CPUs, it can be accessed in real mode if the A20 line is enabled. DOS can load itself into the HMA to free conventional memory.
Can I use extended memory on an 8086 PC?
No. The 8086 and 8088 CPUs cannot access extended memory because they lack protected mode. They can only use expanded memory (EMS) via a separate EMS card or software emulation on later systems.