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:
- Initial Assessment and Instrumentation: When
executed, MemMaker modifies
CONFIG.SYSandAUTOEXEC.BATby prefixing drivers and TSRs with a temporary tracking utility calledSIZER.EXE. - Reboot and Execution Profiling: The system reboots,
and as each program initializes,
SIZER.EXErecords 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. - 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.
- Configuration Update: MemMaker updates
CONFIG.SYSusing theDEVICEHIGHdirective andAUTOEXEC.BATusing theLOADHIGH(orLH) command. It appends the/Lswitch (for example,DEVICEHIGH /L:1,12048) to explicitly define the region and minimum size allocated to each program, preventing fragmented allocation and startup collisions. - 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.UMBandAUTOEXEC.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.