File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 11# C-programming-pre-lab <!-- omit in toc -->
22
33This is a pre-lab to get you started started on compiling and running C programs
4- and using ` valgrind ` to identify memory leaks.
4+ and using ` valgrind ` to identify memory leaks. The tools have been installed on the lab computers.
5+ Be aware that if you want to use your own machine you will have to go through quite a few extra steps to
6+ install the ` gtest ` test suite and the ` valgrind ` memory leak detection program (both described below)
57
68- [ Background] ( #background )
79 - [ Compiling and running a C program] ( #compiling-and-running-a-c-program )
@@ -230,7 +232,10 @@ valgrind ./my_prog
230232```
231233
232234will run the program as normal, and then print out a memory usage/leak
233- report at the end. To get more detailed information, including what
235+ report at the end. If your system doesn't have ` valgrind ` you can install it (on Linux or Windows WSL)
236+ using ` sudo apt-get install valgrind ` . On Mac follow [ these directions] ( https://macappstore.org/valgrind/ ) .
237+
238+ When using ` valgrind ` , to get more detailed information, including what
234239lines generate a leak,
235240
236241- Make sure to compile your program with the ` -g ` flag, and
You can’t perform that action at this time.
0 commit comments