• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 254
  • Last Modified:

memory

I have a C++ applicaion that is running as a daemon. The way I check the memory consumption is

top -p <pid>
I have noticed that "Reident Memory" is continously increasing on certain operation. Is there any easy to find out memory leak on linux.

If Valgrind is the way to go, how can I run it against the c++ daemon
 
0
learningunix
Asked:
learningunix
  • 3
  • 2
1 Solution
 
learningunixAuthor Commented:
When I run the command:

valgrind --tool=memcheck --leak-check=yes myDaemon_g --log-file=valgrind.log

it fails with

error while loading shared libraries: libxyz.so: cannot open shared object file: No such file or directory

what does this mean usually? do I have to set LD_LIBRARY_PATH? is there any easy way to find where this libxyz.so resides on the system
0
 
jkrCommented:
Yes, that means that the lib in question is either not present or your LD_LIBRARY_PATH environment variable does not contain the directory it resides in. The simplest way to locate that lib would be to run

find / -name libxyz.so -print

or

find / -name "libxyz*" -print
0
 
learningunixAuthor Commented:
find / this will take forever. I thought there was some other easy way to do it
0
 
jkrCommented:
Yes, that will take a while, yet it is the safest method. You could try limiting the area to search to '/usr' to save time.
0
 
learningunixAuthor Commented:
thx
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now