Skip to content

Commit a841659

Browse files
committed
Use new pageSize
1 parent 26cb2da commit a841659

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/lib.zig

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,14 @@ pub fn new() !*TCCState {
3232
return tcc_new() orelse error.TCCNewError;
3333
}
3434

35+
const page_size = std.heap.pageSize();
36+
3537
pub const DynMem = struct {
3638
allocator: std.mem.Allocator,
37-
mem: []align(std.mem.page_size) u8,
39+
mem: []align(page_size) u8,
3840

3941
pub fn alloc(allocator: std.mem.Allocator, size: usize) !DynMem {
40-
const mem = try allocator.alignedAlloc(u8, std.mem.page_size, size);
42+
const mem = try allocator.alignedAlloc(u8, page_size, size);
4143
return .{
4244
.allocator = allocator,
4345
.mem = mem,

0 commit comments

Comments
 (0)