diff options
author | Johannes Stoelp <johannes.stoelp@gmail.com> | 2024-08-29 00:28:56 +0200 |
---|---|---|
committer | Johannes Stoelp <johannes.stoelp@gmail.com> | 2024-08-29 00:30:20 +0200 |
commit | a77e6329cfd64147dba99621663b999094239ccf (patch) | |
tree | 6229d76046e43ccc9ece860be14942da63a049c3 | |
parent | d103148e8528e06583128f2acfc27fd160084c77 (diff) | |
download | notes-a77e6329cfd64147dba99621663b999094239ccf.tar.gz notes-a77e6329cfd64147dba99621663b999094239ccf.zip |
valgrind: add basic memcheck
-rw-r--r-- | src/SUMMARY.md | 1 | ||||
-rw-r--r-- | src/trace_profile/README.md | 1 | ||||
-rw-r--r-- | src/trace_profile/valgrind.md | 22 |
3 files changed, 24 insertions, 0 deletions
diff --git a/src/SUMMARY.md b/src/SUMMARY.md index c47d389..2861038 100644 --- a/src/SUMMARY.md +++ b/src/SUMMARY.md @@ -47,6 +47,7 @@ - [perf](./trace_profile/perf.md) - [OProfile](./trace_profile/oprofile.md) - [callgrind](./trace_profile/callgrind.md) + - [valgrind](./trace_profile/valgrind.md) - [Debug](./debug/README.md) - [gdb](./debug/gdb.md) diff --git a/src/trace_profile/README.md b/src/trace_profile/README.md index a0168b8..35d3c5b 100644 --- a/src/trace_profile/README.md +++ b/src/trace_profile/README.md @@ -6,3 +6,4 @@ - [perf](./perf.md) - [OProfile](./oprofile.md) - [callgrind](./callgrind.md) +- [valgrind](./valgrind.md) diff --git a/src/trace_profile/valgrind.md b/src/trace_profile/valgrind.md new file mode 100644 index 0000000..989e3df --- /dev/null +++ b/src/trace_profile/valgrind.md @@ -0,0 +1,22 @@ +# valgrind(1) + +## Memcheck `--tool=memcheck` + +Is the default tool when invoking `valgrind` without explicitly specifying +`--tool`. + +Memory checker used to identify: +- memory leaks +- out of bound accesses +- uninitialized reads + +```sh +valgrind [OPTIONS] PROGRAM [ARGS] + --log-file=FILE Write valgrind output to FILE. + --leak-check=full Enable full leak check. + --track-origins=yes Show origins of undefined values. + --keep-debuginfo=no|yes Keep symbols etc for unloaded code. + + --gen-suppressions=yes Generate suppressions file from the run. + --suppressions=FILE Load suppressions file. +``` |