Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
MEM--Examples
◄Syntax► ◄Notes►
────────────────────────────────────────────────────────────────────────────
MEM──Examples
Getting general program and memory information
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 the following command:
mem /classify
The results might look similar to the following:
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 MS-DOS is running in the
first 64K of extended memory rather than in conventional memory.
Getting information about a specific program
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 the following command:
mem /module win386
If you were running WIN386, the results might look similar to the
following:
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 MS-DOS for the specified program.
♦