use threadsafeallocator

This commit is contained in:
Emil Lerch 2025-07-19 13:14:51 -07:00
parent 7659ad6431
commit 39f872b4f2
Signed by: lobo
GPG key ID: A7B62D657EF764F8

View file

@ -103,7 +103,8 @@ pub fn main() !u8 {
defer if (is_debug) { defer if (is_debug) {
_ = debug_allocator.deinit(); _ = 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); const args = try std.process.argsAlloc(allocator);
defer std.process.argsFree(allocator, args); defer std.process.argsFree(allocator, args);