We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 26cb2da commit a841659Copy full SHA for a841659
src/lib.zig
@@ -32,12 +32,14 @@ pub fn new() !*TCCState {
32
return tcc_new() orelse error.TCCNewError;
33
}
34
35
+const page_size = std.heap.pageSize();
36
+
37
pub const DynMem = struct {
38
allocator: std.mem.Allocator,
- mem: []align(std.mem.page_size) u8,
39
+ mem: []align(page_size) u8,
40
41
pub fn alloc(allocator: std.mem.Allocator, size: usize) !DynMem {
- const mem = try allocator.alignedAlloc(u8, std.mem.page_size, size);
42
+ const mem = try allocator.alignedAlloc(u8, page_size, size);
43
return .{
44
.allocator = allocator,
45
.mem = mem,
0 commit comments