0%

Linux下/proc/pid/maps文件分析

pmap用于输出/proc/pid/maps信息

info

[root@gx6602 /]# cat /proc/943/maps 
00008000-0075b000 r-xp 00000000 00:0b 2224823    /dvb/out.elf
0075b000-00867000 rw-p 00752000 00:0b 2224823    /dvb/out.elf
00867000-00b05000 rwxp 00867000 00:00 0          [heap]
2aaa8000-2aaa9000 r-xp 2aaa8000 00:00 0          [vdso]
2aaaa000-2e6aa000 rw-s 94400000 00:0c 725        /dev/gxav0
2e6aa000-2e6ab000 ---p 2e6aa000 00:00 0 
2e6ab000-2e7aa000 rw-p 2e6ab000 00:00 0 
2e7aa000-2e7ab000 ---p 2e7aa000 00:00 0 
2e7ab000-2e8aa000 rw-p 2e7ab000 00:00 0 
2e8aa000-2e8ab000 ---p 2e8aa000 00:00 0 
2e8ab000-2e9aa000 rw-p 2e8ab000 00:00 0 
2e9aa000-2e9ab000 ---p 2e9aa000 00:00 0 
2e9ab000-2eaaa000 rw-p 2e9ab000 00:00 0 
2eaaa000-2eaab000 ---p 2eaaa000 00:00 0 
2eaab000-2ebaa000 rw-p 2eaab000 00:00 0 
2ebaa000-2ebab000 ---p 2ebaa000 00:00 0 
2ebab000-2ecaa000 rw-p 2ebab000 00:00 0 
2ecaa000-2ecab000 ---p 2ecaa000 00:00 0 
2ecab000-2edaa000 rw-p 2ecab000 00:00 0 
2edaa000-2edab000 ---p 2edaa000 00:00 0 
2edab000-2eeaa000 rw-p 2edab000 00:00 0 
2eeaa000-2eeab000 ---p 2eeaa000 00:00 0 
2eeab000-2f0f1000 rw-p 2eeab000 00:00 0 
2f0f1000-2f0f2000 ---p 2f0f1000 00:00 0 
2f0f2000-2f1f1000 rw-p 2f0f2000 00:00 0 
2f1f1000-2f1f2000 ---p 2f1f1000 00:00 0 
2f1f2000-2f2f1000 rw-p 2f1f2000 00:00 0 
2f2f1000-2f2f2000 ---p 2f2f1000 00:00 0 
2f2f2000-2f3f1000 rw-p 2f2f2000 00:00 0 
2f3f1000-2f3f2000 ---p 2f3f1000 00:00 0 
2f3f2000-2f4f1000 rw-p 2f3f2000 00:00 0 
2f4f1000-2f4f2000 ---p 2f4f1000 00:00 0 
2f4f2000-2f5f1000 rw-p 2f4f2000 00:00 0 
2f5f1000-2f5f2000 ---p 2f5f1000 00:00 0 
2f5f2000-2f6f1000 rw-p 2f5f2000 00:00 0 
2f6f1000-2f6f2000 ---p 2f6f1000 00:00 0 
2f6f2000-2f7f1000 rw-p 2f6f2000 00:00 0 
2f7f1000-2f7f2000 ---p 2f7f1000 00:00 0 
2f7f2000-2f8f1000 rw-p 2f7f2000 00:00 0 
2f8f1000-2f8f2000 ---p 2f8f1000 00:00 0 
2f8f2000-2f9f1000 rw-p 2f8f2000 00:00 0 
2f9f1000-2f9f2000 ---p 2f9f1000 00:00 0 
2f9f2000-2faf1000 rw-p 2f9f2000 00:00 0 
2faf1000-2faf2000 ---p 2faf1000 00:00 0 
2faf2000-2fbf1000 rw-p 2faf2000 00:00 0 
2fbf1000-2fbf2000 ---p 2fbf1000 00:00 0 
2fbf2000-2fcf1000 rw-p 2fbf2000 00:00 0 
2fcf1000-2fcf2000 ---p 2fcf1000 00:00 0 
2fcf2000-2fdf1000 rw-p 2fcf2000 00:00 0 
2fdf1000-2fdf2000 ---p 2fdf1000 00:00 0 
2fdf2000-2fef1000 rw-p 2fdf2000 00:00 0 
2fef1000-2fef2000 ---p 2fef1000 00:00 0 
2fef2000-2fff1000 rw-p 2fef2000 00:00 0 
2fff1000-2fff2000 ---p 2fff1000 00:00 0 
2fff2000-301e1000 rw-p 2fff2000 00:00 0 
301e1000-301e2000 ---p 301e1000 00:00 0 
301e2000-302e1000 rw-p 301e2000 00:00 0 
302e1000-302e2000 ---p 302e1000 00:00 0 
302e2000-303e1000 rw-p 302e2000 00:00 0 
303e1000-303e2000 ---p 303e1000 00:00 0 
303e2000-304e1000 rw-p 303e2000 00:00 0 
304e1000-304e2000 ---p 304e1000 00:00 0 
304e2000-307e2000 rw-p 304e2000 00:00 0 
307e2000-307e3000 ---p 307e2000 00:00 0 
307e3000-308e2000 rw-p 307e3000 00:00 0 
308e2000-308e3000 ---p 308e2000 00:00 0 
308e3000-309e2000 rw-p 308e3000 00:00 0 
309e2000-309e3000 ---p 309e2000 00:00 0 
309e3000-30ae2000 rw-p 309e3000 00:00 0 
7f91c000-7f931000 rwxp 7ffe2000 00:00 0          [stack]
[root@gx6602 /]# ./pmap 943
/dvb/out.elf(943)
00008000 (7500 KB)     r-xp (00:0b 2224823)  /dvb/out.elf
0075b000 (1072 KB)     rw-p (00:0b 2224823)  /dvb/out.elf
00867000 (2680 KB)     rwxp (00:00 0)        [heap]
2aaa8000 (4 KB)        r-xp (00:00 0)        [vdso]
2aaaa000 (61440 KB)    rw-s (00:0c 725)      /dev/gxav0
2e6aa000 (4 KB)        ---p (00:00 0)        
2e6ab000 (1020 KB)     rw-p (00:00 0)        
2e7aa000 (4 KB)        ---p (00:00 0)        
2e7ab000 (1020 KB)     rw-p (00:00 0)        
2e8aa000 (4 KB)        ---p (00:00 0)        
2e8ab000 (1020 KB)     rw-p (00:00 0)        
2e9aa000 (4 KB)        ---p (00:00 0)        
2e9ab000 (1020 KB)     rw-p (00:00 0)        
2eaaa000 (4 KB)        ---p (00:00 0)        
2eaab000 (1020 KB)     rw-p (00:00 0)        
2ebaa000 (4 KB)        ---p (00:00 0)        
2ebab000 (1020 KB)     rw-p (00:00 0)        
2ecaa000 (4 KB)        ---p (00:00 0)        
2ecab000 (1020 KB)     rw-p (00:00 0)        
2edaa000 (4 KB)        ---p (00:00 0)        
2edab000 (1020 KB)     rw-p (00:00 0)        
2eeaa000 (4 KB)        ---p (00:00 0)        
2eeab000 (2328 KB)     rw-p (00:00 0)        
2f0f1000 (4 KB)        ---p (00:00 0)        
2f0f2000 (1020 KB)     rw-p (00:00 0)        
2f1f1000 (4 KB)        ---p (00:00 0)        
2f1f2000 (1020 KB)     rw-p (00:00 0)        
2f2f1000 (4 KB)        ---p (00:00 0)        
2f2f2000 (1020 KB)     rw-p (00:00 0)        
2f3f1000 (4 KB)        ---p (00:00 0)        
2f3f2000 (1020 KB)     rw-p (00:00 0)        
2f4f1000 (4 KB)        ---p (00:00 0)        
2f4f2000 (1020 KB)     rw-p (00:00 0)        
2f5f1000 (4 KB)        ---p (00:00 0)        
2f5f2000 (1020 KB)     rw-p (00:00 0)        
2f6f1000 (4 KB)        ---p (00:00 0)        
2f6f2000 (1020 KB)     rw-p (00:00 0)        
2f7f1000 (4 KB)        ---p (00:00 0)        
2f7f2000 (1020 KB)     rw-p (00:00 0)        
2f8f1000 (4 KB)        ---p (00:00 0)        
2f8f2000 (1020 KB)     rw-p (00:00 0)        
2f9f1000 (4 KB)        ---p (00:00 0)        
2f9f2000 (1020 KB)     rw-p (00:00 0)        
2faf1000 (4 KB)        ---p (00:00 0)        
2faf2000 (1020 KB)     rw-p (00:00 0)        
2fbf1000 (4 KB)        ---p (00:00 0)        
2fbf2000 (1020 KB)     rw-p (00:00 0)        
2fcf1000 (4 KB)        ---p (00:00 0)        
2fcf2000 (1020 KB)     rw-p (00:00 0)        
2fdf1000 (4 KB)        ---p (00:00 0)        
2fdf2000 (1020 KB)     rw-p (00:00 0)        
2fef1000 (4 KB)        ---p (00:00 0)        
2fef2000 (1020 KB)     rw-p (00:00 0)        
2fff1000 (4 KB)        ---p (00:00 0)        
2fff2000 (1980 KB)     rw-p (00:00 0)        
301e1000 (4 KB)        ---p (00:00 0)        
301e2000 (1020 KB)     rw-p (00:00 0)        
302e1000 (4 KB)        ---p (00:00 0)        
302e2000 (1020 KB)     rw-p (00:00 0)        
303e1000 (4 KB)        ---p (00:00 0)        
303e2000 (1020 KB)     rw-p (00:00 0)        
304e1000 (4 KB)        ---p (00:00 0)        
304e2000 (3072 KB)     rw-p (00:00 0)        
307e2000 (4 KB)        ---p (00:00 0)        
307e3000 (1020 KB)     rw-p (00:00 0)        
308e2000 (4 KB)        ---p (00:00 0)        
308e3000 (1020 KB)     rw-p (00:00 0)        
309e2000 (4 KB)        ---p (00:00 0)        
309e3000 (1020 KB)     rw-p (00:00 0)        
7f91c000 (84 KB)       rwxp (00:00 0)        [stack]
mapped:   109868 KB writable/private: 40796 KB shared: 61440 KB

Ref

  1. Understanding Linux /proc/id/maps
  2. linux /proc/pid/maps 信息分析
  3. Linux下 /proc/maps 文件分析
  4. pmap