Something went wrong. Try again.
[WIP] A toy kernel written in Zig
Something went wrong. Try again.
1234567891011121314151617181920212223pub const discovery = @import("mem/discovery.zig");pub const Allocator = @import("mem/Allocator.zig");pub const PhysPageAllocator = @import("mem/PhysPageAllocator.zig");pub const PageTable = @import("mem/PageTable.zig");
pub const pageSize: usize = 4096;
pub const Range = struct { start: usize, end: usize,
pub fn fromSlice(slice: []const u8) Range { return .{ .start = @intFromPtr(slice.ptr), .end = @intFromPtr(slice.ptr + slice.len), }; }
pub fn len(self: *const Range) usize { return self.end - self.start; }};