Note that there are some explanatory texts on larger screens.

plurals
  1. POAre the pmap's RSS and htop's RES the same?
    primarykey
    data
    text
    <p>I run the following simple program</p> <pre><code>#include &lt;stdio.h&gt; #include &lt;stdlib.h&gt; int main() { malloc(1024*1024*32); getchar(); return 0; } </code></pre> <p><code>htop</code> gives this</p> <pre><code>VIRT RES SHR 36684 312 240 </code></pre> <p><code>pmap -x</code> gives this </p> <pre><code>Address Kbytes RSS Dirty Mode Mapping 0000000000400000 0 4 0 r-x-- a.out 0000000000600000 0 4 4 r---- a.out 0000000000601000 0 4 4 rw--- a.out 00007f063d3b7000 0 4 4 rw--- [ anon ] 00007f063f3b8000 0 228 0 r-x-- libc-2.12.1.so 00007f063f532000 0 0 0 ----- libc-2.12.1.so 00007f063f731000 0 16 16 r---- libc-2.12.1.so 00007f063f735000 0 4 4 rw--- libc-2.12.1.so 00007f063f736000 0 12 12 rw--- [ anon ] 00007f063f73b000 0 108 0 r-x-- ld-2.12.1.so 00007f063f93d000 0 12 12 rw--- [ anon ] 00007f063f958000 0 8 8 rw--- [ anon ] 00007f063f95b000 0 4 4 r---- ld-2.12.1.so 00007f063f95c000 0 4 4 rw--- ld-2.12.1.so 00007f063f95d000 0 4 4 rw--- [ anon ] 00007fff4b298000 0 12 12 rw--- [ stack ] 00007fff4b2d7000 0 4 0 r-x-- [ anon ] ffffffffff600000 0 0 0 r-x-- [ anon ] ---------------- ------ ------ ------ total kB 36684 432 88 </code></pre> <p><code>htop</code> and <code>pmap</code> show the same virtual size(36684), but they shows different things for physical memory (<code>htop</code>'s <code>RES</code> = 321 and <code>pmap</code>'s <code>RSS</code> = 432).</p> <p>Maybe I confuse something but is there any difference between <code>htop</code>'s <code>RES</code> and <code>pmap</code>'s <code>RSS</code>?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload