Skip to content

Commit

Permalink
chore: use gpa
Browse files Browse the repository at this point in the history
  • Loading branch information
jiacai2050 committed Jan 7, 2025
1 parent a9ea151 commit a446661
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/07-03.zig
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ const std = @import("std");
const print = std.debug.print;

pub fn main() !void {
var arena = std.heap.ArenaAllocator.init(std.heap.page_allocator);
defer arena.deinit();
const allocator = arena.allocator();
var gpa = std.heap.GeneralPurposeAllocator(.{}){};
defer if (gpa.deinit() != .ok) @panic("leak");
const allocator = gpa.allocator();

var pool: std.Thread.Pool = undefined;
try pool.init(.{
Expand Down

0 comments on commit a446661

Please sign in to comment.