use threadsafeallocator
This commit is contained in:
parent
7659ad6431
commit
39f872b4f2
1 changed files with 2 additions and 1 deletions
|
@ -103,7 +103,8 @@ pub fn main() !u8 {
|
|||
defer if (is_debug) {
|
||||
_ = debug_allocator.deinit();
|
||||
};
|
||||
const allocator = gpa;
|
||||
var tsa = std.heap.ThreadSafeAllocator{ .child_allocator = gpa };
|
||||
const allocator = tsa.allocator();
|
||||
|
||||
const args = try std.process.argsAlloc(allocator);
|
||||
defer std.process.argsFree(allocator, args);
|
||||
|
|
Loading…
Add table
Reference in a new issue