ARCHIVED: On a PC, what is the difference between extended and expanded memory?

This content has been archived, and is no longer maintained by Indiana University. Information here may no longer be accurate, and links may no longer be available or reliable.

Extended memory

Memory addresses greater than or equal to one megabyte are called extended memory. The 8088 and 8086 PCs can't have extended memory because these chips can access only addresses of less than one megabyte (1MB) in size.

With the minor exception of the High Memory Area (HMA), extended memory can be addressed only by applications run in real mode. It is possible, however, for DOS applications to make use of this memory to store data (but not to execute code directly from there). XMS (eXtended Memory Standard, promulgated by Microsoft) permits applications to allocate extended memory and takes care of copying data to and from extended memory and conventional memory so that the application does not have to worry about switching between modes. Like EMS, XMS usually requires loading a device driver of some sort. Extended memory is limited to 15Mb on 286es and 386SXes (15Mb extended plus 1Mb conventional and upper memory equals 16Mb, or 224, 24 being the number of address lines coming out of the CPU), limited to 4 gigabytes (232) for 386DX chips and up, although very few motherboards have been designed to hold that much memory.

Expanded memory

Expanded memory is addressed from within the lower 1MB space, usually above 640K. It is sometimes up to 64K of real addresses but this is just a small portion of the whole expanded memory, which can be very large. The expanded memory requires hardware and/or software that maps the expanded memory to a piece of address space, in what is called a "page frame". Extended memory can be used as expanded memory by using software and the 80286 or 80386 chips to "remap" it to the lower 1MB. It should be noted that the 80386 chip has hardware built in that supports expanded memory while the 80286 chip does not. Software that will convert extended memory on an 80286 machine to expanded memory may result in a significant performance penalty, if the machine does not have special hardware support for expanded memory. Software that will convert extended memory to expanded memory on an 80286 machine is not written to use the special hardware built into the 80386 chip, so the same type of performance penalty may apply.

Hardware supported expanded memory is the fastest form of expanded memory and is available directly on all 80386SX or better IBM compatibles running the proper software. It is also available on some 80286 machines with special chip sets or 80286 machines equipped with a hardware memory manager add-on. Lastly, it is available in a large number of memory expansion boards for all IBM compatible machines, including the 8088/8086 machines.

Expanded memory standards

When looking at expanded memory, one must also take into account such factors as the type of expanded memory being made available. The first widely accepted standard was the Lotus-Intel-Microsoft Expanded Memory Specification (LIM EMS) version 3.2. This provided a way for programs to store information in expanded memory, but did not allow for efficient movement of information or the storing of the actual program. Lotus 1-2-3, for example, could store only cell labels and not values in expanded memory, restricting the real value of this type of expanded memory. Other standards that were developed later included AST's Enhanced Expanded Memory Specification (EEMS) and IBM's Expanded Memory Adapter (XMA). Once combined under LIM EMS version 4.0, these allowed better use of expanded memory. The features in LIM EMS 4.0 include increased page size and the ability to position the page windows anywhere in memory. Version 4.0 allowed programs to load executable code into expanded memory, since the page could be made to appear to be from memory in the 0-640K DOS memory range.

Most memory boards currently offer some sort of LIM EMS 4.0 support but you will still pay a performance penalty unless the board offers full hardware support for LIM EMS 4.0. (Some boards offer software drivers to give the board LIM EMS 4.0 compatibility.)

Under DOS, applications must explicitly use either expanded or extended memory. Lotus 1-2-3 release 3.1 and Microsoft Windows require that extended memory be available in order to operate. Most other DOS programs will use expanded memory only to get around the DOS 640K barrier. Some of the commercial memory management software for the 80386 chip will actually switch memory from expanded to extended memory if a program asks for it.

Under OS/2 or Unix, there is no need for expanded memory because you do not run them on 8088s. The term "extended" memory loses meaning because all the physical memory is available and is allocated to the programs as needed.

A very good discussion of memory appears in Microsoft Windows Resource Kit, which is available in most bookstores.

This is document aalu in the Knowledge Base.
Last modified on 2018-01-18 09:00:59.