How to find the memory usage of shared library running in Linux?
I need to find the memory usage of a shared library loaded in Linux environment.
I need this information for deciding on whether to make the library part in to application or a seperate application itself. |
Take a look at /proc/<pid>/smaps. It reports the memory usage for each shared object loaded in memory. Please, see man proc for details.
|
/proc/pid/smaps and pmap command are not giving the complete size occupied by a shared library. The size depends on the methods from shared lib that are currently attached to the process.
|
|
All times are GMT -5. The time now is 05:19 PM. |