How to install and use dr memory leak tool in linux?

3.1k Views Asked by At

I want to install dr memory leak tool in my linux environment and run leak tool over my process, can somebody help with me installation guide adn how to execute the tool.

1

There are 1 best solutions below

0
On

1) Download the latest DrMemory-Linux-X.X.X-X.tar.gz version of Dr. Memory from https://code.google.com/p/drmemory/downloads/list

2) Untar the package into a directory of your choice:

cd /home/myname/install
tar xzf DrMemory-Linux-X.X.X-X.tar.gz

3) Build your application as 32-bit (Dr. Memory does not yet support 64-bit) with debug info and no inlining for better callstacks:

cd /home/myname/project
g++ -m32 -g -fno-inline -fno-omit-frame-pointer *.cpp -o myapp

4) Run your application under Dr. Memory:

/home/myname/install/DrMemory-Linux-X.X.X-X/bin/drmemory.pl -- ./myapp arg1 arg2 arg3