const std = @import("std"); pub fn main() !void { const a = 2; const b = 3; var myallo = std.heap.GeneralPurposeAllocator(.{}){}; //const mytypeallo = std.heap.LoggingAllocator(std.log.Level.debug, std.log.Level.debug); // const allocator = std.heap.page_allocator; //var myallo = mytypeallo.init(std.heap.page_allocator); const allocator = myallo.allocator(); const mystring = try std.fmt.allocPrint( allocator, "{d} + {d} = {d}", .{ a, b, a + b }, ); defer allocator.free(mystring); std.debug.print("{s}\n", .{mystring}); }