[heap]或[anon]在memps输出中的含义是什么

时间:2014-03-26 11:07:51

标签: c++ linux

当我为其中一个进程运行memps命令时,我将以下行(以及其他行)作为输出。

S(CODE)  S(DATA)  P(CODE)  P(DATA)  3D(RSS)  3D(PSS)   ADDR(start-end)OBJECT NAME
-------- -------- -------- -------- ------- ---------  -----------------------------
      0        0        0     1592        0        0   b8ca6000-b8e54000 [heap]
      0      404        0      404        0        0   b8bdc000-b8ca6000 [heap]
      0        0        0        4        0        0   b6fb5000-b6fb6000 [anon]
      0        0        0       20        0        0   b6fb0000-b6fb5000 [anon]

[heap]和[anon]在我的输出的最后一列中意味着什么。

1 个答案:

答案 0 :(得分:5)

          o  Anonymous memory: Memory  not  relating  to  any
             named  object  or file within the file system is
             reported as [ anon ].

             The pmap command displays common names for  cer-
             tain known anonymous memory mappings, such as:

             [ heap ]
                   The process heap.

             [ stack ]
                   The process stack.

             If the common name for the mapping  is  unknown,
             pmap displays [ anon ] as the mapping name.

source

还有2个pdf here

您应该为此使用更通用的关键字,因为您使用的实用程序只是memtool套件的一部分。 下次尝试使用“memtool anon”作为搜索关键字。