Target Control Debugging: mi Command (Windows Embedded CE 6.0)
1/5/2010
This command displays memory information.
Syntax
mi kernel | full
Parameters
- Kernel
Displays the kernel memory detail.
- Full
Displays a set of tables showing the virtual memory usage for all the processes in the system. The table is made up of ASCII characters that represent what each virtual page is being used for.
Remarks
If you use a command prompt window, enter commands at the Windows Embedded CE prompt. Alternatively, if you use the Platform Builder IDE, from the Target menu choose CE Target Control to display the Target Control window, then enter commands in the Target Control window.
You can use the mi command in three different ways:
Use the mi command with no parameter options, mi
The following output example shows results from the mi command with no options selected:Windows CE Kernel Memory Usage Tool 0.2 Page size=4096, 2976 total pages, 2404 free pages. 28 pages used by kernel, 0 pages held by kernel, 572 pages consumed. Memory usage for Process 808a2180: 'NK.EXE' pid 0 Slot base 02000000 Section ptr 808a18a0 Page summary: code=501(2) data r/o=30 r/w=128 stack=5 reserved=3374 Memory usage for Process 808a221c: 'filesys.exe' pid 1 Slot base 04000000 Section ptr 81fe4000 Page summary: code=76(0) data r/o=23 r/w=13 stack=3 reserved=125 Memory usage for Process 808a22b8: 'shell.exe' pid 2 Slot base 06000000 Section ptr 81fd3000 Page summary: code=61(0) data r/o=23 r/w=6 stack=1 reserved=36 Memory usage for Process 808a2354: 'device.exe' pid 3 Slot base 08000000 Section ptr 81fc8000 Page summary: code=219(2) data r/o=23 r/w=54 stack=12 reserved=404 Memory usage for Process 808a23f0: 'gwes.dll' pid 4 Slot base 0a000000 Section ptr 81f7a000 Page summary: code=161(0) data r/o=198 r/w=234 stack=9 reserved=212 Memory usage for Process 808a248c: 'explorer.exe' pid 5 Slot base 0c000000 Section ptr 81e8b000 Page summary: code=375(0) data r/o=30 r/w=139 stack=8 reserved=165 Mapped file section 0 Slot base 42000000 Section ptr 81fe5000 Page summary: code=0(0) data r/o=0 r/w=17 stack=0 reserved=5197 Total R/W data + stack + RAM code = 633
Use the mi command with the kernel option, mi kernel
The following output example shows results from the mi command with the kernel option:Windows CE Kernel Memory Usage Tool 0.2 Page size=4096, 2976 total pages, 2404 free pages. 28 pages used by kernel, 0 pages held by kernel, 572 pages consumed. Inx Size Used Max Extra Entries Name 0: 168 5040 5544 504 30( 33) Thread 1: 188 6768 6768 0 36( 36) Module 2: 24 504 504 0 21( 21) APISet 3: 84 6972 7140 168 83( 85) Event 4: 16 192 272 80 12( 17) CleanEvent 5: 76 32908 33136 228 433(436) MemBlock 6: 40 1440 1480 40 36( 37) CallStack 7: 520 3120 3640 520 6( 7) Name 8: 44 88 88 0 2( 2) FSMap 9: 64 832 832 0 13( 13) FullRef 10: 116 116 232 116 1( 2) ThrdDbg 11: 36 0 0 0 0( 0) Proxy 12: 100 22500 22600 100 225(226) Crit 13: 104 312 312 0 3( 3) Mutex 14: 32 4928 5056 128 154(158) HData Total Used = 85720 Total Extra = 1884 Waste = 40
Use the mi command with the full option, mi full
When you use mi full, the output shows information detailed in a line-marked page summary. The output displays one table per process in the system.
Each line in a table represents 64K of virtual memory within a process. The first hexadecimal number on each line indicates the base address of the virtual memory for each 64K chunk. The second number on each line, in parentheses, indicates the number of locked pages within the 64K chunk and can generally be ignored.
When addresses are skipped within a table, it signifies that no pages are presently allocated in the entire 64K chunk. Following the first two numbers on a line is a series of ASCII characters, each representing a single page of memory within the line's 64K chunk.
The following table shows the memory information definitions that are included in the page summary.Character Definition <blank>
A blank space indicates a virtual page that is not currently allocated. Does not require a physical page.
-
Reserved but not in use. Indicates a virtual page that is currently allocated but not mapped to any physical memory. Does not require a physical page.
C
Code pages in ROM. Does not require a physical page.
C
Code pages in RAM. Requires a physical page.
S
Indicates a virtual page that holds a stack. Requires a physical page.
P
Indicates a virtual page that is used to map a range of hardware addresses; that is, peripheral memory pages used to map target device memory by using VirtualAlloc.
Does not require a physical page. Peripheral memory may include frame buffer memory.
W
Indicates a virtual page that holds read-write data. Requires a physical page. Read-write pages include global variables as well as dynamically allocated memory.
O
Indicates a virtual page that is used by the object store. Requires a physical page. Should only appear in the Filesys process.
?
Contents unknown.
R
Read-only data pages in RAM. Requires a physical page. Read-only data primarily comes from data items that are declared as a const type in the source code.
R
Read-only data pages in ROM. Does not require a physical page. Read-only data primarily comes from data items that are declared as a const type in the source code.
The following output example shows results from the mi command with the full option:
Memory usage for Process 808a221c: 'filesys.exe' pid 1 Slot base 04000000 Section ptr 81fe4000 04000000(1): -----r---------- 04010000(0): -CCCCCCCCCCCCCCC 04020000(0): CCCCCCWWWWWWWr 04030000(0): -------------SSS 04040000(0): WWW------------- 057f0000(0): -CCCCCCCCCCCCCCC 05800000(0): CCCCCCCCCCCCCCCC 05810000(0): CCCCCCCCCCCCCCCC 05820000(0): CCCCCCCCWRRRRRRR 05830000(0): RRRRRRRRRRRRRRRR 05840000(0): -- Page summary: code=76(0) data r/o=23 r/w=13 stack=3 reserved=125
See Also
Concepts
Target Control Debugging Commands
Debugging Resources Overview