Fix page_size

This commit is contained in:
Dominic Grimm 2025-05-22 15:31:47 +02:00
parent 5969034160
commit 3dec7b42a1
Signed by: dergrimm
SSH key fingerprint: SHA256:0uoWpcqOtkyvQ+ZqBjNYiDqIZY+9s8VeZkkJ/4ryB4E
2 changed files with 2 additions and 2 deletions

View file

@ -10,7 +10,7 @@ pub const Framebuffer = struct {
const Self = @This(); const Self = @This();
file: std.fs.File, file: std.fs.File,
data: []align(std.mem.page_size) u8, data: []align(std.heap.page_size_min) u8,
xres: u32, xres: u32,
yres: u32, yres: u32,

View file

@ -20,7 +20,7 @@ pub fn vscreeninfo(fd: std.posix.fd_t) std.posix.UnexpectedError!c.fb_var_screen
return vinfo; return vinfo;
} }
pub fn mmap_fb(fd: std.posix.fd_t, vinfo: c.fb_var_screeninfo) ![]align(std.mem.page_size) u8 { pub fn mmap_fb(fd: std.posix.fd_t, vinfo: c.fb_var_screeninfo) ![]align(std.heap.page_size_min) u8 {
const data_size: usize = vinfo.xres * vinfo.yres * (vinfo.bits_per_pixel / 8); const data_size: usize = vinfo.xres * vinfo.yres * (vinfo.bits_per_pixel / 8);
const data = try std.posix.mmap( const data = try std.posix.mmap(
null, null,