mirror of
https://github.com/lightpanda-io/browser.git
synced 2026-03-28 15:40:04 +00:00
zig fmt
This commit is contained in:
@@ -63,7 +63,7 @@ pub fn deinit(self: *ArenaPool) void {
|
||||
var it = self._leak_track.iterator();
|
||||
while (it.next()) |kv| {
|
||||
if (kv.value_ptr.* != 0) {
|
||||
log.err(.bug, "ArenaPool leak", .{.name = kv.key_ptr.*, .count = kv.value_ptr.* });
|
||||
log.err(.bug, "ArenaPool leak", .{ .name = kv.key_ptr.*, .count = kv.value_ptr.* });
|
||||
has_leaks = true;
|
||||
}
|
||||
}
|
||||
@@ -130,11 +130,11 @@ pub fn release(self: *ArenaPool, allocator: Allocator) void {
|
||||
if (self._leak_track.getPtr(entry.debug)) |count| {
|
||||
count.* -= 1;
|
||||
if (count.* < 0) {
|
||||
log.err(.bug, "ArenaPool double-free", .{.name = entry.debug});
|
||||
log.err(.bug, "ArenaPool double-free", .{ .name = entry.debug });
|
||||
@panic("ArenaPool: double-free detected");
|
||||
}
|
||||
} else {
|
||||
log.err(.bug, "ArenaPool release unknown", .{.name = entry.debug});
|
||||
log.err(.bug, "ArenaPool release unknown", .{ .name = entry.debug });
|
||||
@panic("ArenaPool: release of untracked arena");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user