switch to raw_c_allocator as this is better for area allocation

This commit is contained in:
Emil Lerch 2023-05-12 17:12:04 -07:00
parent 5f0785aaba
commit e66758ffe5
Signed by: lobo
GPG Key ID: A7B62D657EF764F8

View File

@ -219,8 +219,7 @@ pub fn main() !void {
try bw.flush(); // don't forget to flush!
watcher_thread = try std.Thread.spawn(.{}, Watch.startWatch, .{&watcher});
const max_header_size = 8192;
var allocator = std.heap.c_allocator;
var allocator = std.heap.raw_c_allocator; // raw allocator recommended for use in arenas
var server = std.http.Server.init(allocator, .{ .reuse_address = true });
defer server.deinit();