zigrtiow: alloc image on heap to enable larger images.

This commit is contained in:
Bill Thiede 2022-08-09 21:27:28 -07:00
parent e5ffe87192
commit 91fd65259c

View File

@ -106,7 +106,7 @@ pub fn main() anyerror!void {
const Node = Queue(Task).Node;
const allocator = std.heap.page_allocator;
const cpus = try Thread.getCpuCount();
var pixels: [image_width * image_height]Color = undefined;
var pixels = try allocator.create([image_width * image_height]Color);
var q = Queue(Task).init();
var threads: std.ArrayList(std.Thread) = std.ArrayList(std.Thread).init(allocator);
var row: usize = 0;