1# vmm 2 3 4## Command Function 5 6This command is used to query the virtual memory used by a process. 7 8 9## Syntax 10 11- vmm [_-a / -h / --help_] 12 13- vmm [_pid_] 14 15 16## Parameters 17 18**Table 1** Parameter description 19 20| Parameter| Description| Value Range| 21| -------- | -------- | -------- | 22| -a | Displays the virtual memory usage of all processes.| N/A | 23| -h \| --help | Displays help information.| N/A | 24| pid | Specifies the ID of the process to query.| [0, 63] | 25 26 27## Usage Guidelines 28 29By default, this command displays the virtual memory usage of all processes. 30 31 32## Example 33 34Run **vmm 3**. 35 36 37## Output 38 39Virtual memory usage of process 3: 40 41``` 42OHOS # vmm 3 43 PID aspace name base size pages 44 ---- ------ ---- ---- ----- ---- 45 3 0x408c0118 foundation 0x01000000 0x3e000000 800 46 region name base size mmu_flags pages pg/ref 47 ------ ---- ---- ---- --------- ----- ----- 48 0x408cb364 /bin/foundation 0x06da3000 0x00001000 CH US RD 1 1 49 0x408cb80c /bin/foundation 0x06da4000 0x00001000 CH US RD EX 1 1 50 0x408cb720 /bin/foundation 0x06da5000 0x00001000 CH US RD 1 1 51 0x408cb9a8 /bin/foundation 0x06da6000 0x00001000 CH US RD WR 1 1 52 0x413efde4 HEAP 0x12b43000 0x00015000 CH US RD WR 19 19 53 0x408c3d34 /lib/libc.so 0x23b08000 0x0004a000 CH US RD 25 2 54 0x408cbd44 /lib/libc.so 0x23b52000 0x00068000 CH US RD EX 58 10 55 0x408c3dc0 /lib/libc.so 0x23bba000 0x00002000 CH US RD WR 2 2 56 0x408cc128 /lib/libc.so 0x23bbc000 0x00002000 CH US RD WR 2 2 57 0x408d1634 MMAP 0x23bbe000 0x00005000 CH US RD WR 5 5 58 0x408c4e10 VDSO 0x23bc3000 0x00002000 CH US RD EX 2 2 59 0x408dbaec /lib/libc++.so 0x23bc5000 0x00046000 CH US RD 51 5 60 0x408deba8 /lib/libc++.so 0x23c0b000 0x0009f000 CH US RD EX 29 10 61 0x408debf4 /lib/libc++.so 0x23caa000 0x00006000 CH US RD 6 6 62 0x408c3ce0 /lib/libc++.so 0x23cb0000 0x00001000 CH US RD WR 1 1 63``` 64 65**Table 2** Basic process information 66 67| Parameter| Description| 68| -------- | -------- | 69| PID | Process ID.| 70| aspace | Address of the virtual memory control block.| 71| name | Process name.| 72| base | Start address of the virtual memory.| 73| size | Total Virtual Memory.| 74| pages | Number of used physical pages.| 75 76**Table 3** Virtual memory interval information 77 78| Parameter| Description| 79| -------- | -------- | 80| region | Address of the control block in the virtual memory region.| 81| name | Name of the virtual memory region.| 82| base | Start address of the virtual memory region.| 83| size | Size of the virtual memory region.| 84| mmu_flags | MMU mapping attribute of the virtual memory region.| 85| pages | Number of used physical pages, including that of the shared memory.| 86| pg/ref | Number of used physical pages.| 87