How MS-DOS 6.22 MEM /F Displays Free Memory
This article explains how the MEM /F (or
MEM /FREE) command functions in MS-DOS 6.22 to report
available system memory. It details the specific layout used by the
command, the technical data provided for both conventional and upper
memory blocks, and how users can interpret hexadecimal addresses and
block sizes to optimize system resources.
The MS-DOS 6.22 MEM /F switch instructs the
MEM.EXE utility to scan the chain of Memory Control Blocks
(MCBs) and output a detailed inventory of every unallocated block of
RAM. Unlike the default MEM command, which provides only
high-level totals, the /F parameter specifically identifies
where free spaces exist and how large each individual gap is.
Structure of the Output
When executed, MEM /F organizes free memory into
distinct sections: Conventional Memory (the base 640
KB) and, if configured, Upper Memory (the 640 KB to 1
MB range).
For each unallocated block, the command generates a row containing two primary pieces of information:
- Segment Address: Displayed as a four-digit
hexadecimal number representing the starting segment in system memory
(for example,
02A3C). This corresponds to the physical location immediately following an allocated program or driver. - Size: Displayed in both decimal bytes and
hexadecimal format (for example,
54,320 (D430h)). This specifies the exact contiguous capacity of that individual free block.
Conventional Memory Reporting
Under the "Free Conventional Memory" heading, the utility scans
through low memory. If multiple resident programs (TSRs) or drivers are
loaded non-contiguously, memory becomes fragmented. MEM /F
prints each separate gap between loaded programs as its own line item
with its segment address and size.
At the end of this section, it calculates and displays the Largest executable program size. This figure represents the single largest contiguous free block in conventional memory, indicating the maximum size of an application that can be launched without running out of memory.
Upper Memory Reporting
If the system loads a UMB provider (such as HIMEM.SYS
combined with EMM386.EXE and DOS=UMB in
CONFIG.SYS), MEM /F appends a "Free Upper
Memory" section.
This section lists each unallocated slot within the Upper Memory Area
(UMA). Because upper memory is divided into multiple regions around
adapter ROMs and video buffers, it frequently contains multiple smaller,
disconnected blocks. The command reports each region's starting segment
and available size, concluding with the Largest free upper
memory block, which informs the user whether an additional
device driver can fit using the DEVICEHIGH or
LOADHIGH directives.