Skip to content

Memory management (fixes #22, closes #24) #23

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 64 commits into from
Aug 31, 2024
Merged
Show file tree
Hide file tree
Changes from 53 commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
9c27090
Add build.zig.zon, update build.zig, .gitignore
mnemnion Jul 2, 2024
4792861
Module name is diffz, not DiffMatchPatch
mnemnion Jul 2, 2024
10bcba0
More paths, .target, .optimize
mnemnion Jul 2, 2024
64bc1bf
Memory-managed halfMatch function
mnemnion Jul 2, 2024
0c7c4e2
Managed memory in diffLinesToChars
mnemnion Jul 2, 2024
9e638e8
Clean up easy leaks + prep for allocating Diffs
mnemnion Jul 2, 2024
a5c993f
Managed memory in diffCharsToLines
mnemnion Jul 2, 2024
a2beb6f
Fix for diffCleanupMerge memory
mnemnion Jul 2, 2024
7c5cccc
One test at a time...
mnemnion Jul 2, 2024
dbc3a84
More tests
mnemnion Jul 2, 2024
0b2f274
Fix two double-frees
mnemnion Jul 2, 2024
18b7531
Free two more clobbered diff texts
mnemnion Jul 2, 2024
1ebee82
Restore all diffCleanMerge tests
mnemnion Jul 2, 2024
350a85e
Restore frees to diffCleanupSemanticLossless
mnemnion Jul 2, 2024
fe21b51
Tests of diffCleanupSemanticLossless pass
mnemnion Jul 2, 2024
5ff7a76
alloc -> allocator
mnemnion Jul 2, 2024
b56449f
Tests pass for diffBisect
mnemnion Jul 2, 2024
2388fff
Catch a few leaks, lather, rinse, repeat
mnemnion Jul 3, 2024
7a47bd7
Defer free until slice is taken
mnemnion Jul 3, 2024
eecdb47
Fait accompli
mnemnion Jul 3, 2024
7032b4b
Polish things up
mnemnion Jul 3, 2024
87b1b32
Remove unused temp diff
mnemnion Jul 3, 2024
0655ece
Remove conditional free for zero-length text
mnemnion Jul 7, 2024
f044a8b
Use explicit directory names in .gitignore
mnemnion Jul 7, 2024
9bb2819
Update build.zig to remove empty library
mnemnion Jul 7, 2024
cc640a3
Free resources when allocation fails
mnemnion Jul 7, 2024
481a182
Merge remote-tracking branch 'origin/memory-management' into memory-m…
mnemnion Jul 7, 2024
4b63907
errdefer freeing slice appends
mnemnion Jul 7, 2024
83ac54f
Remove spurious line
mnemnion Jul 7, 2024
a7ab35c
Patch tests
mnemnion Jul 7, 2024
b35dc24
Convert to ensuring capacity before append/insert
mnemnion Jul 7, 2024
58fbf0f
Restore deleted free
mnemnion Jul 7, 2024
39e0af8
Consistent use of Diff.init()
mnemnion Jul 7, 2024
34d3a7b
use `testing.checkAllAllocationFailures`
Techatrix Jul 7, 2024
92e3c3e
Merge pull request #1 from Techatrix/dev
mnemnion Jul 7, 2024
8cb7f01
errdefer halfmatches
mnemnion Jul 7, 2024
aedb7d6
Fixes two leaks
mnemnion Jul 7, 2024
460f047
More memory order bugs
mnemnion Jul 7, 2024
d5dff30
Last of the skipped tests eliminated
mnemnion Jul 7, 2024
ddcbe8f
Errdefer in rebuildtexts
mnemnion Jul 7, 2024
593d38f
Tests for rebuildtexts
mnemnion Jul 8, 2024
39b99aa
Last of the leaks
mnemnion Jul 8, 2024
db41749
Null test for diffCleanupEfficiency
mnemnion Jul 8, 2024
7de6390
Finish port of diffMatchEfficiency
mnemnion Jul 8, 2024
e564009
Add kcov coverage step
mnemnion Jul 8, 2024
0264b16
Remove unnecessary errdefer
mnemnion Jul 8, 2024
046fa0d
Fix half_match code pathway to handle allocation fails
mnemnion Jul 9, 2024
353474a
Update DiffMatchPatch.zig
mnemnion Jul 9, 2024
6979663
Put line var inside while loop
mnemnion Jul 9, 2024
209455f
Merge branch 'memory-management' of https://github.com/mnemnion/diffz…
mnemnion Jul 9, 2024
c662afb
Moves DiffList and functions
mnemnion Jul 9, 2024
4eea3ae
Replace errdefer on best_common_text
mnemnion Jul 9, 2024
71b80af
Use assumeCapacity variant for empty ranges
mnemnion Jul 9, 2024
be49143
Change boolInt
mnemnion Jul 9, 2024
a86b90c
Move coverage directory to zig-out
mnemnion Jul 11, 2024
8859731
Merge remote-tracking branch 'origin/memory-management' into memory-m…
mnemnion Jul 11, 2024
77d3eae
Remove kcov directory from .gitignore
mnemnion Jul 11, 2024
aba5ffa
Fix for diffLineMode memory leaks
mnemnion Jul 14, 2024
07df57b
remove spurious file
mnemnion Jul 14, 2024
01fe8cb
Fix type errors in line mode tests
mnemnion Jul 14, 2024
1483c3e
Make check_lines threshold configurable
mnemnion Jul 14, 2024
bff1f1d
Make diffCleanupSemantic public
mnemnion Jul 14, 2024
15c6643
resolve review comments
Techatrix Aug 31, 2024
3fec21a
add GitHub workflow
Techatrix Aug 31, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
.zig-cache
zig-cache
zig-out
kcov-output
Loading