Skip to content

Commit 836d1ae

Browse files
committed
Improve safety docs for RecursivePageTable::new_unchecked
1 parent ed8566c commit 836d1ae

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/structures/paging/mapper/recursive_page_table.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,9 @@ impl<'a> RecursivePageTable<'a> {
7272
///
7373
/// ## Safety
7474
///
75-
/// The `recursive_index` parameter must be the index of the recursively mapped entry.
75+
/// The given page table must be a level 4 page table that is active in the
76+
/// CPU (i.e. loaded in the CR3 register). The `recursive_index` parameter
77+
/// must be the index of the recursively mapped entry of that page table.
7678
#[inline]
7779
pub unsafe fn new_unchecked(table: &'a mut PageTable, recursive_index: PageTableIndex) -> Self {
7880
RecursivePageTable {

0 commit comments

Comments
 (0)