Andrew Mercer
on this page

    pmap prints the memory map of a process: each mapped executable, shared library, heap, stack, and anonymous region with its size and permissions.

    pmap -x <pid>            # extended: size, resident, dirty per mapping
    pmap -d <pid>            # device format
    sudo pmap -X <pid>       # everything the kernel exports
    

    Lines ending in [ anon ] are memory the program allocated (malloc/mmap) rather than mapped from a file. A growing number of large anonymous regions, or a growing [heap], is where a memory leak shows up. The total line at the bottom gives virtual, resident, and dirty totals. The same information is in /proc/<pid>/maps and /proc/<pid>/smaps.

    Related: top, strace.