Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does [heap] or [anon] means in memps output

Tags:

c++

linux

When I run memps command for one of the processes, I get the following lines (among others) as output.

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]

What does [heap] and [anon] means in the last column of my output.

like image 940
Sumit Nathany Avatar asked Sep 14 '25 18:09

Sumit Nathany


1 Answers

          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

There are also 2 pdfs here

You should probably use more generic keywords for this, since the utility that you are using is just a part of the memtool suite. Next time try something like "memtool anon" as the keywords for your search.

like image 141
user2485710 Avatar answered Sep 16 '25 08:09

user2485710