title: What does pss mean in /proc/pid/smaps
body: <p>I was confused about the <code>Pss</code> column in <code>/proc/pid/smaps</code>, so I wrote a program to test it:</p>
  <pre class="lang-c prettyprint-override"><code>void sa();
  int main(int argc,char *argv[])
  {
      int fd;
      sa();
      sleep(1000);
  }
  
  void sa()
  {
     char *pi=new char[1024*1024*10];
     for(int i=0;i&lt;4;++i) {
          for(int j=0;j&lt;1024*1024;++j){
                  *pi='o';
                  pi++;
          }
     }
     int cnt;
     for(int i=0;i&lt;6;++i) {
          for(int j=0;j&lt;1024*1024;++j){
                  cnt+=*pi;
                  pi++;
          }
     }
     printf(&quot;%d&quot;,cnt);
  }
  </code></pre>
  
  <pre><code>$cat /proc/`pidof testprogram`/smaps
  
  08838000-0885b000 rw-p 00000000 00:00 0          [heap]
  Size:                140 kB
  Rss:                  12 kB
  Pss:                  12 kB
  Shared_Clean:          0 kB
  Shared_Dirty:          0 kB
  Private_Clean:         0 kB
  Private_Dirty:        12 kB
  Referenced:           12 kB
  Swap:                  0 kB
  KernelPageSize:        4 kB
  MMUPageSize:           4 kB
  b6dcd000-b77d0000 rw-p 00000000 00:00 0 
  Size:              10252 kB
  Rss:               10252 kB
  Pss:                4108 kB
  Shared_Clean:          0 kB
  Shared_Dirty:          0 kB
  Private_Clean:         0 kB
  Private_Dirty:      4108 kB
  Referenced:         4108 kB
  Swap:                  0 kB
  KernelPageSize:        4 kB
  MMUPageSize:           4 kB
  </code></pre>
  <p>Here I found <code>Pss</code> equal to <code>Private_Dirty</code>, but I wonder why.</p>
  <p>BTW: Is there any detailed documentation for <code>smaps</code>?</p>