Difference between revisions of "Valgrind"

From Computer Science
Jump to: navigation, search
(Created page with "First, you should make sure to compile your program with debugging information enabled. See GNU Debugger. You can run the <code>valgrind</code> memory checker by running...")
 
Line 1: Line 1:
 +
Note that <code>valgrind</code> is installed on cs.indstate.edu but not on all of the lab desktops, so make sure you are logged into cs in the terminal (e.g., <code>ssh username@cs.indstate.edu</code>).
 +
 
First, you should make sure to compile your program with debugging information enabled.  See [[GNU Debugger]].  You can run the <code>valgrind</code> memory checker by running:
 
First, you should make sure to compile your program with debugging information enabled.  See [[GNU Debugger]].  You can run the <code>valgrind</code> memory checker by running:
 
<pre>
 
<pre>
 
valgrind program_file.o
 
valgrind program_file.o
 
</pre>
 
</pre>

Revision as of 14:42, 25 October 2022

Note that valgrind is installed on cs.indstate.edu but not on all of the lab desktops, so make sure you are logged into cs in the terminal (e.g., ssh username@cs.indstate.edu).

First, you should make sure to compile your program with debugging information enabled. See GNU Debugger. You can run the valgrind memory checker by running:

valgrind program_file.o