feat(mm/phys): implement alloc and free

This commit is contained in:
Loïc Grégoire
2026-04-03 21:16:53 -04:00
parent 5b60f08db5
commit d2bc8f2bf8
6 changed files with 185 additions and 15 deletions
+1 -1
View File
@@ -133,7 +133,7 @@ pub fn RadixPmap(comptime Impl: type) type {
return error.PageNotMapped;
}
const new_table_pa = mi.phys.alloc_page();
const new_table_pa = mi.phys.alloc();
const table_ptr: [*]Impl.Pte = @ptrFromInt(mm.p2v(new_table_pa));
@memset(table_ptr[0..entries_per_table], std.mem.zeroes(Impl.Pte));