Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><strong>Valgrind</strong> can show detailed information but it <strong>slows down</strong> the target application significantly, and most of the time it changes the behavior of the app.<br> <strong>Exmap</strong> was something I didn't know yet, but it seems that you need a <strong>kernel module</strong> to get the information, which can be an obstacle.</p> <p>I assume what everyone wants to know WRT "memory usage" is the following...<br> In linux, the amount of physical memory a single process might use can be roughly divided into following categories.</p> <ul> <li><p><strong>M.a anonymous mapped memory</strong></p> <ul> <li>.p private <ul> <li>.d dirty == malloc/mmapped heap and stack allocated and written memory </li> <li>.c clean == malloc/mmapped heap and stack memory once allocated, written, then freed, but not reclaimed yet </li> </ul></li> <li>.s shared <ul> <li>.d dirty == <strong>malloc/mmaped heap could get copy-on-write and shared among processes</strong> (edited)</li> <li>.c clean == <strong>malloc/mmaped heap could get copy-on-write and shared among processes</strong> (edited)</li> </ul></li> </ul></li> <li><p><strong>M.n named mapped memory</strong></p> <ul> <li>.p private <ul> <li>.d dirty == file mmapped written memory private </li> <li>.c clean == mapped program/library text private mapped </li> </ul></li> <li>.s shared <ul> <li>.d dirty == file mmapped written memory shared </li> <li>.c clean == mapped library text shared mapped </li> </ul></li> </ul></li> </ul> <p>Utility included in Android called <strong>showmap</strong> is quite useful</p> <pre><code>virtual shared shared private private size RSS PSS clean dirty clean dirty object -------- -------- -------- -------- -------- -------- -------- ------------------------------ 4 0 0 0 0 0 0 0:00 0 [vsyscall] 4 4 0 4 0 0 0 [vdso] 88 28 28 0 0 4 24 [stack] 12 12 12 0 0 0 12 7909 /lib/ld-2.11.1.so 12 4 4 0 0 0 4 89529 /usr/lib/locale/en_US.utf8/LC_IDENTIFICATION 28 0 0 0 0 0 0 86661 /usr/lib/gconv/gconv-modules.cache 4 0 0 0 0 0 0 87660 /usr/lib/locale/en_US.utf8/LC_MEASUREMENT 4 0 0 0 0 0 0 89528 /usr/lib/locale/en_US.utf8/LC_TELEPHONE 4 0 0 0 0 0 0 89527 /usr/lib/locale/en_US.utf8/LC_ADDRESS 4 0 0 0 0 0 0 87717 /usr/lib/locale/en_US.utf8/LC_NAME 4 0 0 0 0 0 0 87873 /usr/lib/locale/en_US.utf8/LC_PAPER 4 0 0 0 0 0 0 13879 /usr/lib/locale/en_US.utf8/LC_MESSAGES/SYS_LC_MESSAGES 4 0 0 0 0 0 0 89526 /usr/lib/locale/en_US.utf8/LC_MONETARY 4 0 0 0 0 0 0 89525 /usr/lib/locale/en_US.utf8/LC_TIME 4 0 0 0 0 0 0 11378 /usr/lib/locale/en_US.utf8/LC_NUMERIC 1156 8 8 0 0 4 4 11372 /usr/lib/locale/en_US.utf8/LC_COLLATE 252 0 0 0 0 0 0 11321 /usr/lib/locale/en_US.utf8/LC_CTYPE 128 52 1 52 0 0 0 7909 /lib/ld-2.11.1.so 2316 32 11 24 0 0 8 7986 /lib/libncurses.so.5.7 2064 8 4 4 0 0 4 7947 /lib/libdl-2.11.1.so 3596 472 46 440 0 4 28 7933 /lib/libc-2.11.1.so 2084 4 0 4 0 0 0 7995 /lib/libnss_compat-2.11.1.so 2152 4 0 4 0 0 0 7993 /lib/libnsl-2.11.1.so 2092 0 0 0 0 0 0 8009 /lib/libnss_nis-2.11.1.so 2100 0 0 0 0 0 0 7999 /lib/libnss_files-2.11.1.so 3752 2736 2736 0 0 864 1872 [heap] 24 24 24 0 0 0 24 [anon] 916 616 131 584 0 0 32 /bin/bash -------- -------- -------- -------- -------- -------- -------- ------------------------------ 22816 4004 3005 1116 0 876 2012 TOTAL </code></pre>
    singulars
    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. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      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