Microsoft DOS mem command

Quick links

About mem
Availability
Syntax
Examples
Issues

About mem

Allows you to determine the available, used, and free memory.

Users who are using any version of Microsoft Windows should see document CH000149 for additional information about determining how much memory (RAM) is in the computer instead of using this command.

Availability

The mem.exe command is an external command that is available in the below Microsoft operating systems.

MS-DOS 4.0 and above
Windows 95
Windows 98
Windows ME
Windows NT
Windows 2000
Windows XP

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 largest memory block available.
/DEBUG or /D Displays 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.

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 640k 52k 588k
Upper 0k 0k 0k
Reserved 384k 384k 0k
Extended (XMS) 31,744k 168k 31,576k
--------------- ------ ------ ------
Total memory 31,768k 168k 31,576k
Total under 1 MB 640k 52k 588k

Total Expanded (EMS)                    32M (33,046,528 bytes) 
Free Expanded (EMS)                     16M (16,777,216 bytes) 

Largest executable program size       588K (602,512 bytes) 
Largest free upper memory block         0K        (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.

Issues

When using the mem /c command from a DOS window in Windows no upper blocks will be seen, as shown in the above example. This is caused because Windows reserves all global upper memory blocks for Windows itself.

MS-DOS 6.2 and above will not accept or recognize more than 64 MB of ram when typing mem.

Additional information