android - What's the data in dalvik-LinearAlloc, dalvik-aux-structure, dalvik-bitmap-1, dalvik-bitmap-2, dalvik-card-table, dalvik-mark-stack and dalvik-zygote? -


i use showmap command on pid, , can't understand part in report:

 16384     3752      689        0     3132        0      620    4 /dev/ashmem/dalvik-linearalloc (deleted)   2460     1748      934        0      828        0      920   18 /dev/ashmem/dalvik-aux-structure (deleted)   8192      572      572        0        0        0      572    1 /dev/ashmem/dalvik-bitmap-1 (deleted)   8192        0        0        0        0        0        0    1 /dev/ashmem/dalvik-bitmap-2 (deleted)   4100      312      312        0        0        0      312    1 /dev/ashmem/dalvik-card-table (deleted) 502140    14860    14860        0        0        0    14860    3 /dev/ashmem/dalvik-heap (deleted)   1500      280      280        0        0        0      280    1 /dev/ashmem/dalvik-jit-code-cache (deleted) 174764        0        0        0        0        0        0    1 /dev/ashmem/dalvik-mark-stack (deleted)  22148    22148     2141        0    20452        0     1696    1 /dev/ashmem/dalvik-zygote (deleted) 

i want know data in dalvik-linearalloc, dalvik-aux-structure, dalvik-bitmap-1, dalvik-bitmap-2, dalvik-card-table, dalvik-mark-stack , dalvik-zygote.

these ashmem cost millions bytes memory, , want find measure shrink size of these ashmem.

showmap dumpping smap data 1 process. smap describing process's memory area's detail. in virtual memory manage system, memory can gained system api such mmap, brk. after gaining virtual memory address these apis, address , length recorded in smap.

and let's list each section of dalvik relative memory usage:

  • dalvik heap section(heap management, gc)
    • dalvik-bitmap-1, dalvik-bitmap-2 dalvik heap management data stucture. in dalvik, gc marksweep, , 8 bytes memory marked(used or free) 1 bit in bitmap. these 2 bitmaps used active map(used marking @ runtime) , other used marked map(used @ gc time).
    • dalvik-mark-stack: gc mark step use. mark step iterate bitmap, breadth-first search need stack.
    • dalvik-card-table: used dalvik concurrent gc, in bitmap marking steps, process other tasks lead using memory. these card tables recording memory dirty after first marking step. can see detail searching mark sweep gc.
    • dalvik-heap used process memory usage
    • dalvik-zygote 1 part of hole heap, not used @ gc. processes share these memories such framework resources.
  • dalvik-jit jit memory used in dalvik. jit: in time, convert dex bytecode machine code can executed cpu.
  • dalvik-linearalloc: dalvik's perm memory such as: method, class definition datas, thread stack datas. these memory can setted readonly after parsing class definition.
  • dalvik-aux-structure: auxillary data structures, compress method/class/string const reference. these references used @ each dex file, sum of these memory cost large memory. dalvik create tmp memory shared these references.

if want analysis program's memory, suggest use mat in eclipse. , native heap usage, can use mmap manage.


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -