Use DebugAllocator instead of ArenaAllocator
This commit is contained in:
parent
beca41e511
commit
862f25d6d8
1 changed files with 3 additions and 3 deletions
|
|
@ -3,10 +3,10 @@ const std = @import("std");
|
|||
const day = @import("day");
|
||||
|
||||
pub fn main() !void {
|
||||
var arena = std.heap.ArenaAllocator.init(std.heap.page_allocator);
|
||||
defer arena.deinit();
|
||||
var gpa: std.heap.DebugAllocator(.{}) = .init;
|
||||
defer std.debug.assert(gpa.deinit() == .ok);
|
||||
|
||||
const allocator = arena.allocator();
|
||||
const allocator = gpa.allocator();
|
||||
|
||||
std.debug.print("{s}\n", .{day.title});
|
||||
try day.run(allocator);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue