title: How do VmRSS and resident set size match?
body: <p>I parse data from <code>/proc/[pid]/statm</code> to get a clue about memory usage of a certain process. <code>man proc</code> states that <em>resident set size</em>(measured in 'pages') is the same as VmRSS (KB??) in <code>/proc/[pid]/status</code>. Since they have different values, I would like to understand the connection between these Values. Is there something like a factor I can read somewhere in <code>/proc</code> (I thought of VmPTE but its sth. else...)? Which one of both should I parse to get the size of the used Memory for a certain process?</p>
  
  <pre><code>#ex 1782 = firefox
  
  ~$ cat /proc/1782/statm
    224621 46703 9317 11 0 98637 0
  #          \--- resident set size
  
  ~$ cat /proc/1782/status | grep Vm
    VmPeak:     935584 kB
    VmSize:     898484 kB
    VmLck:           0 kB
    VmHWM:      257608 kB
    VmRSS:      186812 kB
    VmData:     394328 kB
    VmStk:         220 kB
    VmExe:          44 kB
    VmLib:       61544 kB
    VmPTE:        1224 kB
    VmSwap:          0 kB
  </code></pre>