Mem command
The mem command allows users to determine how much memory is used and how much is available.
Windows Vista, 7, 8, or 10 users should use the Windows utility to determine how much RAM (Random-Access Memory) is installed and available. See: How to find how much RAM is installed on a computer.
Availability
The mem command is an external command that is available for the following Microsoft operating systems as mem.exe.
Mem syntax
Displays the amount of used and free memory in your system.
MEM [/CLASSIFY | /DEBUG | /FREE | /MODULE module name] [/PAGE]
/CLASSIFY or /C | Classifies programs by memory usage. Lists the size of programs, provides a summary of memory in use, and lists the largest memory block available. |
/DEBUG or /D | Displays the status of all modules in memory, internal drivers, and other information. |
/FREE or /F | Displays information about the amount of free memory left in both conventional and upper memory. |
/MODULE or /M | Displays a detailed listing of a module's memory use. This option must be followed by the name of a module, optionally separated from /M by a colon. |
/PAGE or /P | Pauses after each screen full of information. |
Mem examples
mem
This command would display information about your memory, as seen in the examples below.
Microsoft Windows 95 and Windows 98 example output:
Memory type Total Used Free
--------------- ------ ------ ------ Conventional 640 k 52 k 588 k Upper 0 k 0 k 0 k Reserved 384 k 384 k 0 k Extended (XMS) 31,768 k 168 k 31,576 k --------------- ------ ------ ------ Total memory 31,768 k 168 k 31,576 k Total under 1 MB 640 k 52 k 588 k Total Expanded (EMS) 32 M (33,046,528 bytes) Free Expanded (EMS) 16 M (16,777,216 bytes)
Largest executable program size 588 K (602,512 bytes) Largest free upper memory block 0 K (0 bytes) MS-DOS is resident in the high memory area.
Windows 2000 and Windows XP example output:
655360 bytes total conventional memory
655360 bytes available to MS-DOS
633872 largest executable program size
1048576 bytes total contiguous extended memory
0 bytes available contiguous extended memory
941056 bytes available XMS memory MS-DOS resident in High Memory Area
mem /f
Display the amount of conventional memory free.
Mem issues
When using the mem /c command from a DOS window in Windows, no upper blocks are seen, as shown in the above example. In Windows 0 bytes are shown because Windows reserves all global upper memory blocks for Windows.
MS-DOS 6.2 and above does not accept or recognize more than 64 MB of ram when typing mem.