title: Want to make /proc/*/smaps output anonymous region sum and /proc/meminfo AnonPages to match to trace actual memory usage precisely
body: <p>I want to see the precise amount of memory each processes
  use as anonymous page, because anonymous memory cannot be
  paged out, thus tracking this usage precisely is important.</p>
  
  <p>One way to get the whole sum of anonymous page is to read /proc/meminfo AnonPages.</p>
  
  <p>The other way is to add up all the entries in smaps file which matches follows:</p>
  
  <ul>
  <li>no name</li>
  <li>[stack]</li>
  <li>[heap]</li>
  <li>/dev/zero</li>
  <li>/dev/shm/...</li>
  <li><strong>Relocated section private_dirty</strong>
  
  <blockquote>
    <p>Section used for relocation would be updated for each process,
    which makes some private_dirty region in a named mapping region.
    Elf loader seems to change read/write attribute using mprotect
    when doing relocation, so it is difficult to differentiate such
    region from a data section, and making 
    it difficult to track these usage from each process
    point of view</p>
  </blockquote></li>
  </ul>
  
  <p>So I would like to know how to differentiate the above
  relocated section, and to precisely track the anonymous
  memory usage for each processes.</p>
  
  <p>Maybe we should add new entry in /proc/*/smaps to show
  the amount of Anonymous memory for each section.</p>