Source From Here
Introduction
You can find the memory used by a program (process) by looking into /proc directory or using standard command such as ps or top. However, you must calculate all memory usage by hand i.e. add Shared Memory + mapped file + total virtual memory size of the process + Resident Set Size + non-swapped physical memory used by process. So how do you find the memory used by a process or program under Linux? Use a tool called pmap. It reports the memory map of a process or processes.
pmap examples
To display process mappings, type
The -x (Or --extended: Show the extended format.)option can be used to provide information about the memory allocation and mapping types per mapping. The amount of resident, non-shared anonymous, and locked memory is shown for each mapping:
Introduction
You can find the memory used by a program (process) by looking into /proc directory or using standard command such as ps or top. However, you must calculate all memory usage by hand i.e. add Shared Memory + mapped file + total virtual memory size of the process + Resident Set Size + non-swapped physical memory used by process. So how do you find the memory used by a process or program under Linux? Use a tool called pmap. It reports the memory map of a process or processes.
pmap examples
To display process mappings, type
The -x (Or --extended: Show the extended format.)option can be used to provide information about the memory allocation and mapping types per mapping. The amount of resident, non-shared anonymous, and locked memory is shown for each mapping: