zig
zig copied to clipboard
std.c: add getpagesizes for freebsd
- FreeBSD getpagesizes allows to get all supported pages sizes by the architecture.
- One of the usage is in conjunction with shm_create_largepage via the 3rg argument as page size index.
- Tested with `const std = @import("std");
pub fn main() !void { var sz = std.mem.zeroes([4]usize); const nmsz = std.c.getpagesizes(&sz, sz.len); std.debug.assert(nmsz > 0); }`