Project Home
Project Home
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - interpreting the output of showmem vs pidin: (1 Item)
   
interpreting the output of showmem vs pidin  
I have a process called 'astro' that appears to be using more memory than expected. Using pidin, I can see this:

# pidin -f mbh -p astro                      
       stack tid thread name          
  32K(516K)*   1 ASTRO                
 8192(132K)    2 conman_thread        
 4096(132K)    3 _WatchdogThread      
  12K(132K)    4 _NucleoThread        
 8192(132K)    5 /AstroServer

Which is pretty clear. However, I also wanted some heap information, so I run showmem, which unfortunately cannot be 
filtered by process other than grep (?)

# showmem -Dsh | grep -n astro               
184:  1441792     401408     471040     430080     118784      20480      385064 astro
185:        0          0          0          0      12288          0      385064 astro (thread 4)
186:        0          0          0          0      49152          0      385064 astro (thread 4)
187:        0          0          0          0       8192          0      385064 astro (thread 5)
188:        0          0          0          0       4096          0      385064 astro (thread 4)
189:        0          0          0          0       8192          0      385064 astro (thread 2)
190:        0          0          0          0      32768          0      385064 astro (thread 1)
191:        0          0          0          0       4096          0      385064 astro (thread 3)

Now I got confused:
1) Why does thread 4 show up 3 times, with different  stack sizes. I used grep -n so you see the line numbers; these  
are not in different sections of the showmem output, and have the same pid.
2) How does pidin show a total heap of 12k for thread 4, but showmem shows another thread 4 with 49k ?
3) the threads show 0 heap. Is that always the case, it being shared ?

I've read through the showmem docs a few times, but I haven't found anything that explains what I am seeing.