File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed
Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -20,3 +20,29 @@ https://github.com/vmg/clar
2020* Make sure everything is fine.
2121
2222* Send your pull request. That's it.
23+
24+
25+ Memory leak checks
26+ ------------------
27+
28+ These are automatically run as part of CI, but if you want to check locally:
29+
30+ #### Linux
31+
32+ Uses [ ` valgrind ` ] ( http://www.valgrind.org/ ) :
33+
34+ ``` console
35+ $ cmake -DBUILD_CLAR=ON -DVALGRIND=ON ..
36+ $ cmake --build .
37+ $ valgrind --leak-check=full --show-reachable=yes --num-callers=50 --suppressions=../libgit2_clar.supp \
38+ ./libgit2_clar
39+ ```
40+
41+ #### macOS
42+
43+ Uses [ ` leaks ` ] ( https://developer.apple.com/library/archive/documentation/Performance/Conceptual/ManagingMemory/Articles/FindingLeaks.html ) , which requires XCode installed:
44+
45+ ``` console
46+ $ MallocStackLogging=1 MallocScribble=1 MallocLogFile=/dev/null CLAR_AT_EXIT=" leaks -quiet \$ PPID" \
47+ ./libgit2_clar
48+ ```
You can’t perform that action at this time.
0 commit comments