const std = @import("std"); pub fn main() !void { const myallo = std.heap.LoggingAllocator(std.log.Level.debug, std.log.Level.debug); var myrealallo = myallo.init(std.heap.page_allocator); const allocator = myrealallo.allocator(); var myarray = try allocator.alloc(u8, 10); defer allocator.free(myarray); for (0..myarray.len) |i| { myarray[i] = @truncate(i); } std.debug.print("{any}\n", .{myarray}); const otherarray = try allocator.alloc(f64, 3); defer allocator.free(otherarray); for (0..otherarray.len) |i| { otherarray[i] = @floatFromInt(i); } std.debug.print("{any}\n", .{otherarray}); }