Add some additional valgrind scrips/options

master
Melroy van den Berg 2022-02-20 02:18:14 +01:00
parent b55503231e
commit 8c37219e32
No known key found for this signature in database
GPG Key ID: 71D11FF23454B9D7
2 changed files with 13 additions and 3 deletions

View File

@ -145,7 +145,7 @@ See latest [Developer Documentation](https://gitlab.melroy.org/libreweb/browser/
Doxygen is build by default. You can disable the doxygen build, if you want, using: `cmake -DDOXYGEN:BOOL=FALSE ..`
### Memory Leaks
### Memory check
First **build** the (Linux) target including *debug symbols*. Binary should be present in the `build/src` folder.
@ -155,6 +155,12 @@ Next, check for memory leaks using `valgrind` by executing:
./scripts/valgrind.sh
```
Or to generate a memory usage plot in [massif format](https://valgrind.org/docs/manual/ms-manual.html), execute:
```sh
./scripts/valgrind_plot.sh
```
## Other platforms
### Microsoft Windows

View File

@ -1,6 +1,10 @@
#!/usr/bin/env bash
# By: Melroy van den Berg
# Description: Used for memory leak analysis,
# be-aware that you will get a lot of false positives messages due to GTK
# be-aware that you will get a lot of false positives messages due to GTK/Glib
valgrind --leak-check=full --track-origins=yes ./build/src/libreweb-browser
cd ./build/src
G_DEBUG=gc-friendly G_SLICE=always-malloc valgrind \
--suppressions=/usr/share/glib-2.0/valgrind/glib.supp \
--leak-check=full --track-origins=yes \
./libreweb-browser