Expand description
Implementation of physical and virtual address and page number.
+Module os::mm::address
source · [−]Expand description
Implementation of physical and virtual address and page number.
Structs
physical address
physical page number
diff --git a/ch5/os/mm/address/struct.PhysAddr.html b/ch5/os/mm/address/struct.PhysAddr.html index 1403f493..4963f74f 100644 --- a/ch5/os/mm/address/struct.PhysAddr.html +++ b/ch5/os/mm/address/struct.PhysAddr.html @@ -5,17 +5,17 @@pub struct PhysAddr(pub usize);
Expand description
physical address
-Tuple Fields
0: usize
Implementations
sourceimpl PhysAddr
impl PhysAddr
sourcepub fn floor(&self) -> PhysPageNum
pub fn floor(&self) -> PhysPageNum
PhysAddr
->PhysPageNum
sourcepub fn ceil(&self) -> PhysPageNum
pub fn ceil(&self) -> PhysPageNum
PhysAddr
->PhysPageNum
sourcepub fn page_offset(&self) -> usize
pub fn page_offset(&self) -> usize
Get page offset
-sourceimpl PhysAddr
impl PhysAddr
sourcepub fn get_mut<T>(&self) -> &'static mut T
pub fn get_mut<T>(&self) -> &'static mut T
Get mutable reference to PhysAddr
value
Tuple Fields
0: usize
Implementations
sourceimpl PhysAddr
impl PhysAddr
sourcepub fn floor(&self) -> PhysPageNum
pub fn floor(&self) -> PhysPageNum
PhysAddr
->PhysPageNum
sourcepub fn ceil(&self) -> PhysPageNum
pub fn ceil(&self) -> PhysPageNum
PhysAddr
->PhysPageNum
sourcepub fn page_offset(&self) -> usize
pub fn page_offset(&self) -> usize
Get page offset
+sourceimpl PhysAddr
impl PhysAddr
sourcepub fn get_mut<T>(&self) -> &'static mut T
pub fn get_mut<T>(&self) -> &'static mut T
Get mutable reference to PhysAddr
value
Trait Implementations
sourceimpl From<PhysAddr> for PhysPageNum
impl From<PhysAddr> for PhysPageNum
sourceimpl From<PhysPageNum> for PhysAddr
impl From<PhysPageNum> for PhysAddr
sourcefn from(v: PhysPageNum) -> Self
fn from(v: PhysPageNum) -> Self
Converts to this type from the input type.
+sourceimpl From<PhysAddr> for PhysPageNum
impl From<PhysAddr> for PhysPageNum
sourceimpl From<PhysPageNum> for PhysAddr
impl From<PhysPageNum> for PhysAddr
sourcefn from(v: PhysPageNum) -> Self
fn from(v: PhysPageNum) -> Self
Converts to this type from the input type.
sourceimpl From<usize> for PhysAddr
impl From<usize> for PhysAddr
T: {PhysAddr, VirtAddr, PhysPageNum, VirtPageNum} T -> usize: T.0 usize -> T: usize.into()
diff --git a/ch5/os/mm/address/struct.PhysPageNum.html b/ch5/os/mm/address/struct.PhysPageNum.html index e1714daa..82588821 100644 --- a/ch5/os/mm/address/struct.PhysPageNum.html +++ b/ch5/os/mm/address/struct.PhysPageNum.html @@ -5,13 +5,13 @@pub struct PhysPageNum(pub usize);
Expand description
physical page number
-Tuple Fields
0: usize
Implementations
sourceimpl PhysPageNum
impl PhysPageNum
sourcepub fn get_pte_array(&self) -> &'static mut [PageTableEntry]
pub fn get_pte_array(&self) -> &'static mut [PageTableEntry]
Get PageTableEntry
on PhysPageNum
sourcepub fn get_bytes_array(&self) -> &'static mut [u8]
pub fn get_bytes_array(&self) -> &'static mut [u8]
sourcepub fn get_mut<T>(&self) -> &'static mut T
pub fn get_mut<T>(&self) -> &'static mut T
Trait Implementations
sourceimpl Clone for PhysPageNum
impl Clone for PhysPageNum
sourcefn clone(&self) -> PhysPageNum
fn clone(&self) -> PhysPageNum
Returns a copy of the value. Read more
+Tuple Fields
0: usize
Implementations
sourceimpl PhysPageNum
impl PhysPageNum
sourcepub fn get_pte_array(&self) -> &'static mut [PageTableEntry]
pub fn get_pte_array(&self) -> &'static mut [PageTableEntry]
Get PageTableEntry
on PhysPageNum
sourcepub fn get_bytes_array(&self) -> &'static mut [u8]
pub fn get_bytes_array(&self) -> &'static mut [u8]
sourcepub fn get_mut<T>(&self) -> &'static mut T
pub fn get_mut<T>(&self) -> &'static mut T
Trait Implementations
sourceimpl Clone for PhysPageNum
impl Clone for PhysPageNum
sourcefn clone(&self) -> PhysPageNum
fn clone(&self) -> PhysPageNum
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for PhysPageNum
impl Debug for PhysPageNum
sourceimpl From<PhysAddr> for PhysPageNum
impl From<PhysAddr> for PhysPageNum
sourceimpl From<PhysAddr> for PhysPageNum
impl From<PhysAddr> for PhysPageNum
sourceimpl From<PhysPageNum> for usize
impl From<PhysPageNum> for usize
sourcefn from(v: PhysPageNum) -> Self
fn from(v: PhysPageNum) -> Self
Converts to this type from the input type.
-sourceimpl From<PhysPageNum> for PhysAddr
impl From<PhysPageNum> for PhysAddr
sourcefn from(v: PhysPageNum) -> Self
fn from(v: PhysPageNum) -> Self
Converts to this type from the input type.
+sourceimpl From<PhysPageNum> for PhysAddr
impl From<PhysPageNum> for PhysAddr
sourcefn from(v: PhysPageNum) -> Self
fn from(v: PhysPageNum) -> Self
Converts to this type from the input type.
sourceimpl From<usize> for PhysPageNum
impl From<usize> for PhysPageNum
sourceimpl Ord for PhysPageNum
impl Ord for PhysPageNum
sourcefn cmp(&self, other: &PhysPageNum) -> Ordering
fn cmp(&self, other: &PhysPageNum) -> Ordering
1.21.0 · sourcefn max(self, other: Self) -> Self
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
diff --git a/ch5/os/mm/address/struct.SimpleRange.html b/ch5/os/mm/address/struct.SimpleRange.html index 76ce8881..54599d63 100644 --- a/ch5/os/mm/address/struct.SimpleRange.html +++ b/ch5/os/mm/address/struct.SimpleRange.html @@ -4,16 +4,16 @@pub struct SimpleRange<T> where
T: StepByOne + Copy + PartialEq + PartialOrd + Debug, {
+ Struct os::mm::address::SimpleRange
source · [−]
pub struct SimpleRange<T> where
T: StepByOne + Copy + PartialEq + PartialOrd + Debug, {
l: T,
r: T,
}
Expand description
a simple range structure for type T
-Fields
l: T
r: T
Implementations
Trait Implementations
sourceimpl<T: Clone> Clone for SimpleRange<T> where
T: StepByOne + Copy + PartialEq + PartialOrd + Debug,
impl<T: Clone> Clone for SimpleRange<T> where
T: StepByOne + Copy + PartialEq + PartialOrd + Debug,
sourcefn clone(&self) -> SimpleRange<T>
fn clone(&self) -> SimpleRange<T>
Returns a copy of the value. Read more
+Fields
l: T
r: T
Implementations
Trait Implementations
sourceimpl<T: Clone> Clone for SimpleRange<T> where
T: StepByOne + Copy + PartialEq + PartialOrd + Debug,
impl<T: Clone> Clone for SimpleRange<T> where
T: StepByOne + Copy + PartialEq + PartialOrd + Debug,
sourcefn clone(&self) -> SimpleRange<T>
fn clone(&self) -> SimpleRange<T>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl<T> IntoIterator for SimpleRange<T> where
T: StepByOne + Copy + PartialEq + PartialOrd + Debug,
impl<T> IntoIterator for SimpleRange<T> where
T: StepByOne + Copy + PartialEq + PartialOrd + Debug,
type Item = T
type Item = T
The type of the elements being iterated over.
+sourceimpl<T> IntoIterator for SimpleRange<T> where
T: StepByOne + Copy + PartialEq + PartialOrd + Debug,
impl<T> IntoIterator for SimpleRange<T> where
T: StepByOne + Copy + PartialEq + PartialOrd + Debug,
impl<T: Copy> Copy for SimpleRange<T> where
T: StepByOne + Copy + PartialEq + PartialOrd + Debug,
Auto Trait Implementations
impl<T> RefUnwindSafe for SimpleRange<T> where
T: RefUnwindSafe,
impl<T> Send for SimpleRange<T> where
T: Send,
impl<T> Sync for SimpleRange<T> where
T: Sync,
impl<T> Unpin for SimpleRange<T> where
T: Unpin,
impl<T> UnwindSafe for SimpleRange<T> where
T: UnwindSafe,
Blanket Implementations
impl<T: Copy> Copy for SimpleRange<T> where
T: StepByOne + Copy + PartialEq + PartialOrd + Debug,
Auto Trait Implementations
impl<T> RefUnwindSafe for SimpleRange<T> where
T: RefUnwindSafe,
impl<T> Send for SimpleRange<T> where
T: Send,
impl<T> Sync for SimpleRange<T> where
T: Sync,
impl<T> Unpin for SimpleRange<T> where
T: Unpin,
impl<T> UnwindSafe for SimpleRange<T> where
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> From<T> for T
impl<T> From<T> for T
const: unstable · sourcefn from(t: T) -> T
fn from(t: T) -> T
Returns the argument unchanged.
diff --git a/ch5/os/mm/address/struct.SimpleRangeIterator.html b/ch5/os/mm/address/struct.SimpleRangeIterator.html index d5a6c2d9..8aef1816 100644 --- a/ch5/os/mm/address/struct.SimpleRangeIterator.html +++ b/ch5/os/mm/address/struct.SimpleRangeIterator.html @@ -4,12 +4,12 @@pub struct SimpleRangeIterator<T> where
T: StepByOne + Copy + PartialEq + PartialOrd + Debug, {
+ Struct os::mm::address::SimpleRangeIterator
source · [−]
pub struct SimpleRangeIterator<T> where
T: StepByOne + Copy + PartialEq + PartialOrd + Debug, {
current: T,
end: T,
}
Expand description
iterator for the simple range structure
-Fields
current: T
end: T
Implementations
sourceimpl<T> SimpleRangeIterator<T> where
T: StepByOne + Copy + PartialEq + PartialOrd + Debug,
impl<T> SimpleRangeIterator<T> where
T: StepByOne + Copy + PartialEq + PartialOrd + Debug,
Trait Implementations
sourceimpl<T> Iterator for SimpleRangeIterator<T> where
T: StepByOne + Copy + PartialEq + PartialOrd + Debug,
impl<T> Iterator for SimpleRangeIterator<T> where
T: StepByOne + Copy + PartialEq + PartialOrd + Debug,
type Item = T
type Item = T
The type of the elements being iterated over.
-sourcefn next(&mut self) -> Option<Self::Item>
fn next(&mut self) -> Option<Self::Item>
Advances the iterator and returns the next value. Read more
+Fields
current: T
end: T
Implementations
sourceimpl<T> SimpleRangeIterator<T> where
T: StepByOne + Copy + PartialEq + PartialOrd + Debug,
impl<T> SimpleRangeIterator<T> where
T: StepByOne + Copy + PartialEq + PartialOrd + Debug,
Trait Implementations
sourceimpl<T> Iterator for SimpleRangeIterator<T> where
T: StepByOne + Copy + PartialEq + PartialOrd + Debug,
impl<T> Iterator for SimpleRangeIterator<T> where
T: StepByOne + Copy + PartialEq + PartialOrd + Debug,
type Item = T
type Item = T
The type of the elements being iterated over.
+sourcefn next(&mut self) -> Option<Self::Item>
fn next(&mut self) -> Option<Self::Item>
Advances the iterator and returns the next value. Read more
1.0.0 · sourcefn size_hint(&self) -> (usize, Option<usize>)
fn size_hint(&self) -> (usize, Option<usize>)
Returns the bounds on the remaining length of the iterator. Read more
1.0.0 · sourcefn count(self) -> usize
fn count(self) -> usize
Consumes the iterator, counting the number of iterations and returning it. Read more
1.0.0 · sourcefn last(self) -> Option<Self::Item>
fn last(self) -> Option<Self::Item>
Consumes the iterator, returning the last element. Read more
diff --git a/ch5/os/mm/address/struct.VirtAddr.html b/ch5/os/mm/address/struct.VirtAddr.html index 42e379b8..bb381ad2 100644 --- a/ch5/os/mm/address/struct.VirtAddr.html +++ b/ch5/os/mm/address/struct.VirtAddr.html @@ -5,17 +5,17 @@pub struct VirtAddr(pub usize);
Expand description
virtual address
-Tuple Fields
0: usize
Implementations
sourceimpl VirtAddr
impl VirtAddr
sourcepub fn floor(&self) -> VirtPageNum
pub fn floor(&self) -> VirtPageNum
VirtAddr
->VirtPageNum
sourcepub fn ceil(&self) -> VirtPageNum
pub fn ceil(&self) -> VirtPageNum
VirtAddr
->VirtPageNum
sourcepub fn page_offset(&self) -> usize
pub fn page_offset(&self) -> usize
Get page offset
-Tuple Fields
0: usize
Implementations
sourceimpl VirtAddr
impl VirtAddr
sourcepub fn floor(&self) -> VirtPageNum
pub fn floor(&self) -> VirtPageNum
VirtAddr
->VirtPageNum
sourcepub fn ceil(&self) -> VirtPageNum
pub fn ceil(&self) -> VirtPageNum
VirtAddr
->VirtPageNum
sourcepub fn page_offset(&self) -> usize
pub fn page_offset(&self) -> usize
Get page offset
+Trait Implementations
sourceimpl From<VirtAddr> for VirtPageNum
impl From<VirtAddr> for VirtPageNum
sourceimpl From<VirtPageNum> for VirtAddr
impl From<VirtPageNum> for VirtAddr
sourcefn from(v: VirtPageNum) -> Self
fn from(v: VirtPageNum) -> Self
Converts to this type from the input type.
+sourceimpl From<VirtAddr> for VirtPageNum
impl From<VirtAddr> for VirtPageNum
sourceimpl From<VirtPageNum> for VirtAddr
impl From<VirtPageNum> for VirtAddr
sourcefn from(v: VirtPageNum) -> Self
fn from(v: VirtPageNum) -> Self
Converts to this type from the input type.
sourceimpl Ord for VirtAddr
impl Ord for VirtAddr
1.21.0 · sourcefn max(self, other: Self) -> Self
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
diff --git a/ch5/os/mm/address/struct.VirtPageNum.html b/ch5/os/mm/address/struct.VirtPageNum.html index 486614af..1ea25a01 100644 --- a/ch5/os/mm/address/struct.VirtPageNum.html +++ b/ch5/os/mm/address/struct.VirtPageNum.html @@ -5,13 +5,13 @@pub struct VirtPageNum(pub usize);
Expand description
virtual page number
-Tuple Fields
0: usize
Implementations
sourceimpl VirtPageNum
impl VirtPageNum
Tuple Fields
0: usize
Implementations
Trait Implementations
sourceimpl Clone for VirtPageNum
impl Clone for VirtPageNum
sourcefn clone(&self) -> VirtPageNum
fn clone(&self) -> VirtPageNum
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for VirtPageNum
impl Debug for VirtPageNum
sourceimpl From<VirtAddr> for VirtPageNum
impl From<VirtAddr> for VirtPageNum
sourceimpl From<VirtPageNum> for usize
impl From<VirtPageNum> for usize
sourcefn from(v: VirtPageNum) -> Self
fn from(v: VirtPageNum) -> Self
Converts to this type from the input type.
-sourceimpl From<VirtPageNum> for VirtAddr
impl From<VirtPageNum> for VirtAddr
sourcefn from(v: VirtPageNum) -> Self
fn from(v: VirtPageNum) -> Self
Converts to this type from the input type.
+sourceimpl From<VirtAddr> for VirtPageNum
impl From<VirtAddr> for VirtPageNum
sourceimpl From<VirtPageNum> for usize
impl From<VirtPageNum> for usize
sourcefn from(v: VirtPageNum) -> Self
fn from(v: VirtPageNum) -> Self
Converts to this type from the input type.
+sourceimpl From<VirtPageNum> for VirtAddr
impl From<VirtPageNum> for VirtAddr
sourcefn from(v: VirtPageNum) -> Self
fn from(v: VirtPageNum) -> Self
Converts to this type from the input type.
sourceimpl From<usize> for VirtPageNum
impl From<usize> for VirtPageNum
sourceimpl Ord for VirtPageNum
impl Ord for VirtPageNum
sourcefn cmp(&self, other: &VirtPageNum) -> Ordering
fn cmp(&self, other: &VirtPageNum) -> Ordering
1.21.0 · sourcefn max(self, other: Self) -> Self
fn max(self, other: Self) -> Self
sourceimpl StepByOne for VirtPageNum
impl StepByOne for VirtPageNum
impl Copy for VirtPageNum
impl Eq for VirtPageNum
impl StructuralEq for VirtPageNum
impl StructuralPartialEq for VirtPageNum
Auto Trait Implementations
impl RefUnwindSafe for VirtPageNum
impl Send for VirtPageNum
impl Sync for VirtPageNum
impl Unpin for VirtPageNum
impl UnwindSafe for VirtPageNum
Blanket Implementations
sourceimpl StepByOne for VirtPageNum
impl StepByOne for VirtPageNum
impl Copy for VirtPageNum
impl Eq for VirtPageNum
impl StructuralEq for VirtPageNum
impl StructuralPartialEq for VirtPageNum
Auto Trait Implementations
impl RefUnwindSafe for VirtPageNum
impl Send for VirtPageNum
impl Sync for VirtPageNum
impl Unpin for VirtPageNum
impl UnwindSafe for VirtPageNum
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> From<T> for T
impl<T> From<T> for T
const: unstable · sourcefn from(t: T) -> T
fn from(t: T) -> T
Returns the argument unchanged.
diff --git a/ch5/os/mm/address/trait.StepByOne.html b/ch5/os/mm/address/trait.StepByOne.html index a52981fd..b2aa284c 100644 --- a/ch5/os/mm/address/trait.StepByOne.html +++ b/ch5/os/mm/address/trait.StepByOne.html @@ -4,7 +4,7 @@