Search code examples
androidmemoryadb

How to print Android memory map?


I have problem with Android Memory map. I want to see memory maps of process then I find solution like this in adb shell

cat /proc/[pid]/maps

but It doesn't show anything because error of "Permission Denied" (My phone is not rooting phone..)

Am I doing something wrong ? Is there another solution( another command..) of this problem?

I want to see memory maps of processes.. !


Solution

  • memory regions in the com.android.browser a) address ranges:- (1) The unnamed regions could be anything. As one example, the dlmalloc implementation will use mmap() to allocate large regions (where "large" is configurable; might be 64K or 256K). b)There're multiple [stack:xxxx] regions, are they thread local stacks? If not, what are they? (2) The [stack:xxxx] stacks are thread stacks for the specified thread; each is 1MB with a guard page to trap over/underruns. They won't all be sequential because not all threads are started at the same time. c) How see the memory map for the kernel space? (3) The kernel starts at 0xc0000000. ASLR causes things to be placed somewhat randomly. There are various tools for poking at the Linux kernel. Commands in android to see memory map:-

     root@android:/ # cat /proc/2348/maps
    
    /proc/<pid>/statm
    /proc/<pid>/maps
    /proc/<pid>/smaps
    

    The 'top' command will show VSS and RSS. Vss = virtual set size Rss = resident set size For more details you can further visit at http://elinux.org/Android_Memory_Usage