LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to find the memory usage of shared library running in Linux? (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-find-the-memory-usage-of-shared-library-running-in-linux-847402/)

sathyadurai 11-30-2010 02:55 AM

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.

colucix 11-30-2010 03:33 AM

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.

sathyadurai 11-30-2010 11:24 PM

/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.

colucix 12-01-2010 02:15 AM

Hmmm... maybe it's necessary some more sophisticated tool like memprof, valgrind or exmap. I have no experience with these tools, anyway.


All times are GMT -5. The time now is 05:19 PM.