MS-DOS 6.22 MemMaker and Dynamic UMB Mapping

This article explains how MS-DOS 6.22 utilizes the MemMaker utility to optimize program load addresses through dynamic Upper Memory Block (UMB) mapping. It covers the operational mechanics of MemMaker, how it analyzes driver memory footprints, and how it automates the placement of resident programs to maximize available conventional memory.

In MS-DOS 6.22, the utility responsible for optimizing program load addresses using dynamic UMB mapping is MemMaker (MEMMAKER.EXE). First introduced in MS-DOS 6.0, MemMaker was designed to eliminate the tedious manual process of configuring device drivers and Terminate-and-Stay-Resident (TSR) programs into the upper memory area (between 640 KB and 1024 KB), freeing up as much conventional memory (the first 640 KB) as possible for application software.

MemMaker achieves this optimization by collaborating directly with the extended memory manager (HIMEM.SYS) and the expanded memory emulator (EMM386.EXE). EMM386.EXE creates UMBs by mapping unused addresses in the reserved upper memory area to extended memory. MemMaker then determines the most efficient way to fit various drivers and TSRs into these fragmented UMB regions.

The optimization process relies on a dynamic multi-pass system:

  1. Initial Assessment and Instrumentation: When executed, MemMaker modifies CONFIG.SYS and AUTOEXEC.BAT by prefixing drivers and TSRs with a temporary tracking utility called SIZER.EXE.
  2. Reboot and Execution Profiling: The system reboots, and as each program initializes, SIZER.EXE records its maximum transient memory footprint (the memory needed during initialization) versus its final resident size. Many drivers require significantly more memory during initial startup than they do while idling.
  3. Bin-Packing Calculation: After profiling, MemMaker calculates the optimal placement of each program using a bin-packing algorithm. It determines not just which programs can fit into upper memory, but the exact order and specific regions they should occupy.
  4. Configuration Update: MemMaker updates CONFIG.SYS using the DEVICEHIGH directive and AUTOEXEC.BAT using the LOADHIGH (or LH) command. It appends the /L switch (for example, DEVICEHIGH /L:1,12048) to explicitly define the region and minimum size allocated to each program, preventing fragmented allocation and startup collisions.
  5. Verification: A final reboot confirms that all drivers load without errors. If an issue occurs, MemMaker includes an undo feature that restores the original system files from backups (CONFIG.UMB and AUTOEXEC.UMB).

Through this automated analysis and dynamic mapping strategy, MemMaker ensures that the maximum amount of base conventional memory remains open for memory-intensive DOS applications and games.