summaryrefslogtreecommitdiff
path: root/src/File.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/File.zig')
-rw-r--r--src/File.zig5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/File.zig b/src/File.zig
index 8e5c0101..05d02673 100644
--- a/src/File.zig
+++ b/src/File.zig
@@ -961,7 +961,7 @@ fn edit(p: *Pardes, f: *State, off: usize, len: usize, bytes_in: []const u8, who
undo_gone = f.history.journal.swap(p.gpa, old, old_len, new_len);
} else {
// Raw: `free` overwrites a safe build's freed memory, a whole
- // file's worth; and its digest word goes (src/walk.zig).
+ // file's worth.
pardes.memory.freeRaw(p.gpa, old);
}
} else {
@@ -972,8 +972,6 @@ fn edit(p: *Pardes, f: *State, off: usize, len: usize, bytes_in: []const u8, who
@memcpy(buffer[off..][0..bytes.len], bytes);
f.content = buffer[0..new_len];
f.cap = buffer.len;
- // Written in place: a word a digest kept for it is no longer its.
- pardes.walk.forget(@intFromPtr(buffer.ptr));
}
f.revision +%= 1;
f.splice = .{ .revision = f.revision, .head = span.head, .tail = span.tail, .old_len = old_len };
@@ -1034,7 +1032,6 @@ fn grow(gpa: std.mem.Allocator, f: *State, n: usize) !void {
if (n <= room.len) return;
const want = n + @max(n / 8, 4096);
if (room.len > 0) if (gpa.remap(room, want)) |grown| {
- pardes.walk.forget(@intFromPtr(room.ptr));
f.content = grown[0..f.content.len];
f.cap = grown.len;
return;