Displays the amount of used and free memory on your computer.
You can use the MEM command to display information about allocated memory areas, free memory areas, and programs that are currently loaded into memory.
MEM [/P[ROGRAM] | /C[LASSIFY] | /D[EBUG] | /F[REE] | /M[ODULE] programname] [/P[AGE]] [/A] [/H]
To display the status of your computer's used and free memory:
MEM
none.
For information about checking the amount of space available on
a disk, see the CHKDSK command.
CLEARMEM (Resource Kit) -
Clear Memory Leaks.
WINMSD - Windows NT Diagnostics (including Physical Memory).
GUI Task Manager - for all program details including Win32
applications.
TLIST - Task List.
Equivalent Linux BASH commands:
free -t - Display a summary of current memory usage and
availability.
MEM will only display details about the current CMD shell environment, programs running in a separate shell (or WIN32 programs) will not be listed - so it won't tell you anything about total memory usage.
Increase desktop heap memory for non-interactive processes - Q126962 (SharedSection=1024,3072,3072). NOTE that NT 4 has a system wide limit of ~48MB for all desktops, so a 3M heap will allow a max 16 processes while 512K heap will allow a max 96 processes.
DisablePagingExecutive - Q184419 (use this when >500M RAM is available).
You can use the DOSKEY program to automatically add the /PAGE switch to the MEM command. Then, each time you use MEM, it will pause after each screenful of information even if you don't type the /P switch on the MEM command-line. To do this, add the commands to your AUTOEXEC.BAT file:
C:\DOS\DOSKEY DOSKEY mem=MEM.EXE $* /P
The operating system displays the status of extended memory only if you have installed memory above the 1-megabyte (MB) boundary in your system. The operating system displays the status of expanded memory only if you use expanded memory that conforms to version 4.0 of the Lotus/Intel/Microsoft Expanded Memory Specification (LIM EMS). The operating system displays the status of the upper memory area only if a UMB provider such as EMM386.EXE is installed and the command DOS=UMB is included in the CONFIG.SYS file. The operating system does not display the status of the upper memory area if you issue the MEM command while you are running Win3x.
To allocate Interrupt 15h memory and XMS memory at the same time, use the /INT15 switch when you load the HIMEM.SYS device driver.
Suppose your system has both expanded memory and extended memory. To display a summary of your system's total memory -- conventional, expanded, extended, and upper -- and to display a list of programs currently loaded into memory, type:
MEM /CLASSIFY
The results might look similar to:
Modules using memory below 1 MB: Name Total = Conventional + Upper Memory -------- ---------------- ---------------- ---------------- SYSTEM 16,477 (16K) 16,461 (16K) 16 (0K) SETVER 784 (1K) 784 (1K) 0 (0K) HIMEM 1,168 (1K) 1,168 (1K) 0 (0K) EMM386 3,120 (3K) 3,120 (3K) 0 (0K) USPI14 9,120 (9K) 9,120 (9K) 0 (0K) COMMAND 3,680 (4K) 3,680 (4K) 0 (0K) SMARTDRV 37,680 (37K) 21,280 (21K) 16,400 (16K) MOUSE 17,088 (17K) 17,088 (17K) 0 (0K) NETBEUI 42,432 (41K) 41,760 (41K) 672 (1K) REDIR 86,064 (84K) 76,128 (74K) 9,936 (10K) ANARKEY 14,384 (14K) 0 (0K) 14,384 (14K) ZPOWER 4,368 (4K) 0 (0K) 4,368 (4K) ANSI 4,208 (4K) 0 (0K) 4,208 (4K) DRVSPACE 36,848 (36K) 0 (0K) 36,848 (36K) PROTMAN 128 (0K) 0 (0K) 128 (0K) EXP16 9,056 (9K) 0 (0K) 9,056 (9K) WORKGRP 4,368 (4K) 0 (0K) 4,368 (4K) RAMDRIVE 1,312 (1K) 0 (0K) 1,312 (1K) Free 472,464 (461K) 464,448 (454K) 8,016 (8K) Memory Summary: Type of Memory Total = Used + Free ---------------- ---------- ---------- ---------- Conventional 655,360 190,912 464,448 Upper 109,712 101,696 8,016 Reserved 393,216 393,216 0 Extended (XMS) 15,618,928 12,424,048 3,194,880 ---------------- ---------- ---------- ---------- Total memory 16,777,216 13,109,872 3,667,344 Total under 1 MB 765,072 292,608 472,464 Largest executable program size 464,352 (453K) Largest free upper memory block 7,888 (8K) MS-DOS is resident in the high memory area.
"Reserved" is the memory located on add-on boards such as video adapter boards. "Largest executable program size" is the largest contiguous block of conventional memory available for a program. "Largest free upper memory block" is the largest area of upper memory available for a program. "MS-DOS is resident in the high memory area" indicates that the operating system is running in the first 64K of extended memory rather than in conventional memory.
To find out what memory a specific program module has allocated, use the MEM /MODULE command. For example, to find out what memory the WIN386 module has allocated, you would type:
MEM /MODULE win386
If you were running WIN386, the results might look similar to:
WIN386 is using the following memory: Segment Region Total Type ------- ------ ---------------- -------- 0081D 80 (0K) Data 02EF8 384 (0K) Environment 02F10 89,856 (88K) Program 0D4D0 1 96 (0K) Data 0D611 1 7,888 (8K) Data 0EFFE 2 32 (0K) Data ---------------- Total Size: 98,336 (96K)
Some program modules, such as WIN386, allocate more than one area of memory. The MEM /MODULE command displays all the areas of memory allocated by the specified program, and shows the segment address and size of each allocation. For upper memory blocks, MEM /MODULE also shows the region number. The Type column shows how the program is using that particular area of memory. The "total size," in this case 98,336 bytes (96K), shows the total amount of memory allocated by the operating system for the specified program.
none.