change allocator to raw_c_allocator
This commit is contained in:
@@ -3,9 +3,9 @@ const fs = std.fs;
|
||||
const io = std.io;
|
||||
const mem = std.mem;
|
||||
const os = std.os;
|
||||
const heap = std.heap;
|
||||
const ArrayList = std.ArrayList;
|
||||
const Allocator = std.mem.Allocator;
|
||||
const GeneralPurposeAllocator = std.heap.GeneralPurposeAllocator;
|
||||
|
||||
const flags = @import("flags.zig");
|
||||
const User = @import("User.zig");
|
||||
@@ -26,14 +26,12 @@ const usage =
|
||||
pub fn main() !void {
|
||||
// This line is here because of https://github.com/ziglang/zig/issues/7807
|
||||
const argv: []const [*:0]const u8 = os.argv;
|
||||
var gpa = GeneralPurposeAllocator(.{}){};
|
||||
defer gpa.deinit();
|
||||
const allocator = gpa.allocator();
|
||||
const gpa = heap.raw_c_allocator;
|
||||
|
||||
const stderr = io.getStdErr().writer();
|
||||
const stdout = io.getStdOut().writer();
|
||||
|
||||
const return_code = execute(allocator, stdout, stderr, argv[1..]);
|
||||
const return_code = execute(gpa, stdout, stderr, argv[1..]);
|
||||
os.exit(return_code);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user