mirror of
https://github.com/ziglang/zig.git
synced 2024-11-30 09:02:32 +00:00
14 lines
294 B
Zig
14 lines
294 B
Zig
const std = @import("std");
|
|
|
|
pub fn main() !void {
|
|
var arena = std.heap.ArenaAllocator.init(std.heap.page_allocator);
|
|
defer arena.deinit();
|
|
|
|
const allocator = arena.allocator();
|
|
|
|
const ptr = try allocator.create(i32);
|
|
std.debug.print("ptr={*}\n", .{ptr});
|
|
}
|
|
|
|
// exe=succeed
|