Many applications that execute at the command line
have strict memory limitations. For example, you might try to run an old
DOS application and find that it doesn't work as anticipated (or at
all). In some cases, the application will tell you that it lacks
sufficient memory, but in other cases, you need to diagnose the problem
yourself using the Mem utility. This utility provides you with detailed
information about the memory at the command prompt, which differs from
the memory that Windows provides. The standard output shows the total
amount of conventional memory, the amount of memory available to run
applications, the amount of extended memory, and the amount of expanded
memory. This utility uses the following syntax:
MEM [/PROGRAM | /DEBUG | /CLASSIFY]
The following list describes each of the command line arguments.
/PROGRAM or /P
Displays the
status of programs currently loaded into memory. Use this command line
switch to identify applications that you can remove to free memory. Figure 1
shows typical output when using this command line switch. Notice that
the output lists every memory usage, including the memory used by the
command processor for requirements such as the file handles and drives.
The size column shows the memory usage for the application or other
element in hexadecimal. The – Free – indicator in the Type column shows areas of free memory in the current command prompt.
NOTE
The programs
loaded into memory for the command prompt aren't the same programs that
are loaded into the Windows environment. The list of applications that
you see when you view the Applications tab of the Windows Task Manager
won't match those shown at the command prompt. The environments are
separate. Windows treats the command prompt as a single black box
entity, even though it's running one or more applications.
/DEBUG or /D
Displays the status of
the programs, internal drivers, and other elements of the command
prompt. Use this command line switch to identify potential problems at
the command line prompt. The output from this command line switch looks
like a very detailed version of the program output shown in Figure 12.2.
/CLASSIFY or /C
Displays the
programs based on memory usage. Categorizes the programs by size,
provides a list of memory in use, and displays the largest memory block
available. Use this command line switch to check for potential problems
in memory allocation. As shown in Figure 2,
the classify view is a little more readable than the other views and
offers the memory allocation sizes in decimal. In addition, you can see
the use of upper memory with greater ease.
Not all older applications
require more memory. A few older applications actually fail when they
have too much memory. If your efforts to run the application fail when
it has as much memory as possible, try reducing the available memory.
|
|