Today, I will try valgrind, a tool to analyze c++ app.
Download the newest version:
Then use valgrind to launch your app, e.g.
Download the newest version:
wget http://valgrind.org/downloads/valgrind-3.9.0.tar.bz2unzip it
tar jxvf valgrind-3.9.0.tar.bz2then enter the folder and compile it with root account
cd valgrind-3.9.0install required libs
./configure
make
make install
apt-get install libc6-dbg
Then use valgrind to launch your app, e.g.
# valgrind --leak-check=yes --log-file=profile ./data_service_d ./config.xml &You will get the below from profile file in current folder.
[1] 25076
root@vm8:/home/dist/tcp# ==25076== Memcheck, a memory error detector
==25076== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==25076== Using Valgrind-3.9.0 and LibVEX; rerun with -h for copyright info
==25076== Command: ./data_service_d ./config.xml
==25076==
No comments:
Post a Comment