feat: implement `Clone` for `PageTable`
@@ -177,8 +177,12 @@ const ENTRY_COUNT: usize = 512;
///
/// This struct implements the `Index` and `IndexMut` traits, so the entries can be accessed
/// through index operations. For example, `page_table[15]` returns the 15th page table entry.
+///
+/// Note that while this type implements [`Clone`], the users must be careful not to introduce
+/// mutable aliasing by using the cloned page tables.
#[repr(align(4096))]
#[repr(C)]
+#[derive(Clone)]
pub struct PageTable {
entries: [PageTableEntry; ENTRY_COUNT],
}
