{
  "id": "enwiki-001372924683",
  "slug": "dos-memory-management",
  "title": "DOS memory management",
  "qid": "",
  "lead": "In IBM PC compatible computing, DOS memory management refers to software and techniques employed to give applications access to more than 640 kibibytes (640*1024 bytes) (KiB) of \"conventional memory\". The 640 KiB limit was specific to the IBM PC and close compatibles; other machines running DOS had different limits, for example the Apricot PC could have up to 768 KiB and the Sirius Victor 9000, 896 KiB. Memory management on the IBM family was made complex by the need to maintain backward compatibility to the original PC design and real-mode DOS, while allowing computer users to take advantage of large amounts of low-cost memory and new generations of processors. Since DOS has given way to Microsoft Windows and other 32-bit operating systems not restricted by the original arbitrary 640 KiB limit of the IBM PC, managing the memory of a personal computer no longer requires the user to manually manipulate internal settings and parameters of the system. The 640 KiB limit imposed great complexity on hardware and software intended to circumvent it; the physical memory in a machine could be organized as a combination of base or conventional memory (including lower memory), upper memory, high memory (not the same as upper memory), extended memory, and expanded memory, all handled in different ways.",
  "body": "In IBM PC compatible computing, DOS memory management refers to software and techniques employed to give applications access to more than 640 kibibytes (640*1024 bytes) (KiB) of \"conventional memory\". The 640&nbsp;KiB limit was specific to the IBM PC and close compatibles; other machines running DOS had different limits, for example the Apricot PC could have up to 768 KiB and the Sirius Victor 9000, 896&nbsp;KiB. Memory management on the IBM family was made complex by the need to maintain backward compatibility to the original PC design and real-mode DOS, while allowing computer users to take advantage of large amounts of low-cost memory and new generations of processors. Since DOS has given way to Microsoft Windows and other 32-bit operating systems not restricted by the original arbitrary 640&nbsp;KiB limit of the IBM PC, managing the memory of a personal computer no longer requires the user to manually manipulate internal settings and parameters of the system. The 640 KiB limit imposed great complexity on hardware and software intended to circumvent it; the physical memory in a machine could be organized as a combination of base or conventional memory (including lower memory), upper memory, high memory (not the same as upper memory), extended memory, and expanded memory, all handled in different ways. ===A20 handler=== The A20 handler is software controlling access to the high memory area. Extended memory managers usually provide this functionality. In DOS, high memory area managers, such as HIMEM.SYS had the extra task of managing A20 and provided an API for opening/closing A20. DOS itself could utilize the area for some of its storage needs, thereby freeing up more conventional memory for programs. This functionality was enabled by the \"DOS=HIGH\" directive in the CONFIG.SYS configuration file. ===A20 gate on later processors=== The Intel 80486 and Pentium added a special pin named A20M#, which when asserted low forces bit 20 of the physical address to be zero for all on-chip cache or external memory accesses. This was necessary since the 80486 introduced an on-chip cache, and therefore masking this bit in external logic was no longer possible. Software still needs to manipulate the gate and must still deal with external peripherals (the chipset) for that. ==80386 and subsequent processors== Intel processors from the 386 onward allowed a virtual 8086 mode, which simplified the hardware required to implement expanded memory for DOS applications. Expanded memory managers such as Quarterdeck's QEMM product and Microsoft's EMM386 supported the expanded memory standard without requirement for special memory boards. On 386 and subsequent processors, memory managers like QEMM might move the bulk of the code for a driver or TSR into extended memory and replace it with a small fingerhold that was capable of accessing the extended-memory-resident code. They might analyze memory usage to detect drivers that required more RAM during startup than they did subsequently, and recover and reuse the memory that was no longer needed after startup. They might even remap areas of memory normally used for memory-mapped I/O. Many of these tricks involved assumptions about the functioning of drivers and other components. In effect, memory managers might reverse-engineer and modify other vendors' code on the fly. As might be expected, such tricks did not always work. Therefore, memory managers also incorporated very elaborate systems of configurable options, and provisions for recovery should a selected option render the PC unbootable (a frequent occurrence). Installing and configuring a memory manager might involve hours of experimentation with options, repeatedly rebooting the machine, and testing the results. But conventional memory was so valuable that PC owners felt that such time was well-spent if the result was to free up 30 or 40&nbsp;KiB of conventional memory space. ==See also== Global EMM Import Specification (GEMMIS) Virtual DMA Services (VDS) Virtual Control Program Interface (VCPI) Extended Virtual Control Program Interface (XVCPI) DOS Protected Mode Interface (DPMI) DOS Protected Mode Services (DPMS) Helix Cloaking ==References==",
  "categories": [
    "22930649",
    "22944364",
    "22992030",
    "23118434",
    "23603337",
    "24043274",
    "56905663",
    "68328988",
    "90989515"
  ],
  "license": "CC BY-SA 4.0",
  "source_uri": "https://en.wikipedia.org/w/index.php?oldid=1372924683",
  "content_hash": "",
  "created_at": null,
  "updated_at": 1788388811.0,
  "claims": [],
  "contradictions": [],
  "confidence": 0.6,
  "csl": {
    "id": "enwiki-001372924683",
    "type": "webpage",
    "title": "DOS memory management",
    "author": [
      {
        "family": "Anticloud FZ LLE",
        "literal": "Anticloud FZ LLE"
      }
    ],
    "container-title": "encyclopegia.org",
    "publisher": "Anticloud FZ LLE",
    "publisher-place": "Dubai, United Arab Emirates",
    "URL": "https://encyclopegia.org/a/dos-memory-management",
    "issued": {
      "date-parts": [
        [
          2026,
          11,
          22
        ]
      ]
    },
    "accessed": {
      "date-parts": [
        [
          2026,
          11,
          22
        ]
      ]
    },
    "license": "CC BY-SA 4.0",
    "DOI": "eo1:enwiki-001372924683",
    "isBasedOn": "https://en.wikipedia.org/w/index.php?oldid=1372924683",
    "note": "Immutable snapshot enwiki-001372924683"
  }
}