Skip to content

Commit c4d2b4a

Browse files
authored
Update README.md
Added directions to install `valgrind` on Linux (Debian), WSL, and Mac systems.
1 parent 8a7d638 commit c4d2b4a

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

README.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
# C-programming-pre-lab <!-- omit in toc -->
22

33
This 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

232234
will 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
234239
lines generate a leak,
235240

236241
- Make sure to compile your program with the `-g` flag, and

0 commit comments

Comments
 (0)