pmap

The pmap tool reports all memory regions mapped by a process.

To show all memory regions:

root:~> pmap 28534
28534:    dolphin ­–­icon system­-file­-manager ­-caption Dolphin
0000000000400000     4K r­-x–­­ dolphin
0000000000600000     4K r­­­­—- dolphin
0000000000601000     4K rw­­­— dolphin
0000000000f42000 13128K rw—­­­ [ anon ]
00007f6a18000000   132K rw­­­— [ anon ]
00007f6a18021000 65404K —–­­­­­ [ anon ]
00007f6a1c000000   132K rw—­­­ [ anon ]
00007f6a1c021000 65404K —–­­­­­ [ anon ]
00007f6a20000000   132K rw—­­­ [ anon ]
00007f6a20021000 65404K —–­­­­­ [ anon ]
00007f6a25ca2000    68K r­-x–­­ kuriikwsfilter.so
[…]
00007ffcb2ddb000     8K r­-x–­­ [ anon ]
ffffffffff600000     4K r­-x–­­ [ anon ]
total 1075708K

To show memory regions between 2 addresses:

root:~> pmap ­-A 00007f6a5aa4c000,ffffffffff600000 28534
28534:    dolphin ­­icon system­-file-­manager ­-caption Dolphin
00007f6a5aa4c000     4K rw—­­­ [ anon ]
00007ffcb2d8e000   132K rw—­­­ [ stack ]
00007ffcb2dd9000     8K r­­­­—- [ anon ]
00007ffcb2ddb000     8K r-­x–­­ [ anon ]
ffffffffff600000     4K r­-x–­­ [ anon ]
total 156K

To show the mapped regions and their corresponding files:

root:~> pmap -­A 00007f6a5a99c000,ffffffffff600000 ­-p 28534
28534:    dolphin ­­icon system-­file-­manager ­-caption Dolphin
00007f6a5a99c000    44K r­­–s-­ /var/cache/fontconfig/12b26b60a24f8b4feb03ad48a333a72­le64.cache­4
00007f6a5a9a7000   120K rw­­­— [ anon ]
00007f6a5a9c5000   144K r­-x–­­ /usr/lib64/libsystemd.so.0.5.0
00007f6a5a9e9000     4K r­­­—-­ /usr/lib64/libsystemd.so.0.5.0
00007f6a5a9ea000     4K rw—­­­ /usr/lib64/libsystemd.so.0.5.0
00007f6a5a9eb000   108K rw­—­­ [ anon ]
00007f6a5aa06000    60K r­-x–­­ /usr/lib64/libudev.so.1.6.1
00007f6a5aa15000     4K r­—-­­­ /usr/lib64/libudev.so.1.6.1
[…]
00007ffcb2dd9000     8K r­­­­—- [ anon ]
00007ffcb2ddb000     8K r-­x–­­ [ anon ]
ffffffffff600000     4K r­-x–­­ [ anon ]
total 860K

With the flags -x, -X and -XX we shall get even more verbose output:

root:~> pmap ­-A 00007f6a5aa40000,ffffffffff600000 -­X 28534
28534:    dolphin ­­icon system-­file­-manager ­-caption Dolphin
         Address Perm   Offset Device    Inode   Size   Rss   Pss Referenced Anonymous Swap Locked Mapping
        00400000 r-­xp 00000000  fd:00 13768246      4     4     4          4         0    0      0 dolphin
        00f42000 rw­-p 00000000  00:00        0  13128 12936 12936      12936     12936    0      0 [heap]
[…]
    7ffcb2d8e000 rw-­p 00000000  00:00        0    136    76    76         76        76    0      0 [stack]
    7ffcb2dd9000 r­­–p 00000000  00:00        0      8     0     0          0         0    0      0 [vvar]
ffffffffff600000 r­-xp 00000000  00:00        0      4     0     0          0         0    0      0 [vsyscall]
                                               ======= ===== ===== ========== ========= ==== ======
                                              1075712 91340 51258      91340     20088    0      0 KB

 

<< prlimit                           gstack >>