Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
b3196a60
Commit
b3196a60
authored
Jun 10, 2019
by
Robert Coup
Committed by
Robert Coup
Jun 12, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add memleak check docs
Document how to run it locally on macOS & Linux
parent
f4584a1e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
0 deletions
+26
-0
tests/README.md
+26
-0
No files found.
tests/README.md
View file @
b3196a60
...
...
@@ -20,3 +20,29 @@ https://github.com/vmg/clar
*
Make sure everything is fine.
*
Send your pull request. That's it.
Memory leak checks
------------------
These are automatically run as part of CI, but if you want to check locally:
#### Linux
Uses
[
`valgrind`
](
http://www.valgrind.org/
)
:
```
console
$
cmake
-DBUILD_CLAR
=
ON
-DVALGRIND
=
ON ..
$
cmake
--build
.
$
valgrind
--leak-check
=
full
--show-reachable
=
yes
--num-callers
=
50
--suppressions
=
../libgit2_clar.supp
\
./libgit2_clar
```
#### macOS
Uses
[
`leaks`
](
https://developer.apple.com/library/archive/documentation/Performance/Conceptual/ManagingMemory/Articles/FindingLeaks.html
)
, which requires XCode installed:
```
console
$
MallocStackLogging
=
1
MallocScribble
=
1
MallocLogFile
=
/dev/null
CLAR_AT_EXIT
=
"leaks -quiet
\$
PPID"
\
./libgit2_clar
```
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment