From d1786a33a3c71fc3d1298cc8c273055e9fc35c4f Mon Sep 17 00:00:00 2001 From: Erwin Boskma Date: Wed, 15 May 2024 13:21:05 +0200 Subject: [PATCH] Switch from page_allocator to GeneralPurposeAllocator --- src/main.zig | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main.zig b/src/main.zig index f3f191f..9d1edda 100644 --- a/src/main.zig +++ b/src/main.zig @@ -24,10 +24,13 @@ const ToplevelFullscreen = enum { Fullscreen, NotFullscreen }; pub fn main() anyerror!void { std.log.info("Vegetable Hamper v{}", .{version}); + var gpa = std.heap.GeneralPurposeAllocator(.{}){}; + const allocator = gpa.allocator(); + var context = Context{ .toplevel_mgr = null, .idle_inhibit_mgr = null, - .handles = std.AutoHashMap(*zwlr.ForeignToplevelHandleV1, ToplevelFullscreen).init(std.heap.page_allocator), + .handles = std.AutoHashMap(*zwlr.ForeignToplevelHandleV1, ToplevelFullscreen).init(allocator), .idle_inhibitor = null, .shm = null, .compositor = null,