Constant crate_metadata::BSS_SECTION_NAME
pub const BSS_SECTION_NAME: &'static str;
diff --git a/doc/crate_metadata/constant.BSS_SECTION_NAME.html b/doc/crate_metadata/constant.BSS_SECTION_NAME.html index 1712c1fc76..b421a41a64 100644 --- a/doc/crate_metadata/constant.BSS_SECTION_NAME.html +++ b/doc/crate_metadata/constant.BSS_SECTION_NAME.html @@ -1 +1 @@ -
pub const BSS_SECTION_NAME: &'static str;
pub const BSS_SECTION_NAME: &'static str;
pub const DATA_SECTION_NAME: &'static str;
pub const DATA_SECTION_NAME: &'static str;
pub const EH_FRAME_SECTION_NAME: &'static str;
pub const EH_FRAME_SECTION_NAME: &'static str;
pub const GCC_EXCEPT_TABLE_SECTION_NAME: &'static str;
pub const GCC_EXCEPT_TABLE_SECTION_NAME: &'static str;
pub const RODATA_SECTION_NAME: &'static str;
pub const RODATA_SECTION_NAME: &'static str;
pub const TEXT_SECTION_NAME: &'static str;
pub const TEXT_SECTION_NAME: &'static str;
pub const TLS_BSS_SECTION_NAME: &'static str;
pub const TLS_BSS_SECTION_NAME: &'static str;
pub const TLS_DATA_SECTION_NAME: &'static str;
pub const TLS_DATA_SECTION_NAME: &'static str;
pub enum SectionType {
+SectionType in crate_metadata - Rust Enum crate_metadata::SectionType
source · pub enum SectionType {
Text,
Rodata,
Data,
@@ -30,19 +30,19 @@
that should be called when traversing up the stack for cleanup.
Blog post from author of gold linker: https://www.airs.com/blog/archives/460
Some documentation here: https://gcc.gnu.org/wiki/Dwarf2EHNewbiesHowto
-
source
. Read moresource
. Read moreself
and other
values to be equal, and is used
+ __D: Deserializer<'de>,self
and other
values to be equal, and is used
by ==
.Returns the argument unchanged.
diff --git a/doc/crate_metadata/type.Shndx.html b/doc/crate_metadata/type.Shndx.html index 02657da92b..3781a112ea 100644 --- a/doc/crate_metadata/type.Shndx.html +++ b/doc/crate_metadata/type.Shndx.html @@ -1,4 +1,4 @@ -pub type Shndx = usize;
A Section Header iNDeX (SHNDX), as specified by the ELF format. +
pub type Shndx = usize;
A Section Header iNDeX (SHNDX), as specified by the ELF format.
Even though this is typically encoded as a u16
,
its decoded form can exceed the max size of u16
.
pub enum FramesIteratorRequest {
+FramesIteratorRequest in frame_allocator - Rust pub enum FramesIteratorRequest {
Next,
Stop,
AllocateAt {
diff --git a/doc/frame_allocator/enum.MemoryRegionType.html b/doc/frame_allocator/enum.MemoryRegionType.html
index d4a09fcd6f..25af611dbb 100644
--- a/doc/frame_allocator/enum.MemoryRegionType.html
+++ b/doc/frame_allocator/enum.MemoryRegionType.html
@@ -1,4 +1,4 @@
-MemoryRegionType in frame_allocator - Rust pub enum MemoryRegionType {
+MemoryRegionType in frame_allocator - Rust pub enum MemoryRegionType {
Free,
Reserved,
Unknown,
@@ -10,9 +10,9 @@
§Unknown
Memory of an unknown type.
This is a default value that acts as a sanity check, because it is invalid
to do any real work (e.g., allocation, access) with an unknown memory region.
-
Trait Implementations§
source§impl Clone for MemoryRegionType
source§fn clone(&self) -> MemoryRegionType
Returns a copy of the value. Read more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read moresource§impl Debug for MemoryRegionType
source§impl PartialEq<MemoryRegionType> for MemoryRegionType
source§fn eq(&self, other: &MemoryRegionType) -> bool
This method tests for self
and other
values to be equal, and is used
+Trait Implementations§
source§impl Clone for MemoryRegionType
source§fn clone(&self) -> MemoryRegionType
Returns a copy of the value. Read more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read moresource§impl Debug for MemoryRegionType
source§impl PartialEq<MemoryRegionType> for MemoryRegionType
source§fn eq(&self, other: &MemoryRegionType) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
.source§impl Copy for MemoryRegionType
source§impl Eq for MemoryRegionType
source§impl StructuralEq for MemoryRegionType
source§impl StructuralPartialEq for MemoryRegionType
Auto Trait Implementations§
§impl RefUnwindSafe for MemoryRegionType
§impl Send for MemoryRegionType
§impl Sync for MemoryRegionType
§impl Unpin for MemoryRegionType
§impl UnwindSafe for MemoryRegionType
Blanket Implementations§
source§impl Copy for MemoryRegionType
source§impl Eq for MemoryRegionType
source§impl StructuralEq for MemoryRegionType
source§impl StructuralPartialEq for MemoryRegionType
Auto Trait Implementations§
§impl RefUnwindSafe for MemoryRegionType
§impl Send for MemoryRegionType
§impl Sync for MemoryRegionType
§impl Unpin for MemoryRegionType
§impl UnwindSafe for MemoryRegionType
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moresource§impl<T> From<T> for T
source§fn from(t: T) -> T
Returns the argument unchanged.
diff --git a/doc/frame_allocator/fn.allocate_frames.html b/doc/frame_allocator/fn.allocate_frames.html
index b710b72bc0..e03178a4ea 100644
--- a/doc/frame_allocator/fn.allocate_frames.html
+++ b/doc/frame_allocator/fn.allocate_frames.html
@@ -1,3 +1,3 @@
-allocate_frames in frame_allocator - Rust Function frame_allocator::allocate_frames
source · pub fn allocate_frames(num_frames: usize) -> Option<AllocatedFrames<Page4K>>
Expand description
Allocates the given number of frames with no constraints on the starting physical address.
+allocate_frames in frame_allocator - Rust Function frame_allocator::allocate_frames
source · pub fn allocate_frames(num_frames: usize) -> Option<AllocatedFrames<Page4K>>
Expand description
Allocates the given number of frames with no constraints on the starting physical address.
See allocate_frames_deferred()
for more details.
\ No newline at end of file
diff --git a/doc/frame_allocator/fn.allocate_frames_at.html b/doc/frame_allocator/fn.allocate_frames_at.html
index bd4548b30c..89ac0df561 100644
--- a/doc/frame_allocator/fn.allocate_frames_at.html
+++ b/doc/frame_allocator/fn.allocate_frames_at.html
@@ -1,4 +1,4 @@
-allocate_frames_at in frame_allocator - Rust Function frame_allocator::allocate_frames_at
source · pub fn allocate_frames_at(
+allocate_frames_at in frame_allocator - Rust Function frame_allocator::allocate_frames_at
source · pub fn allocate_frames_at(
paddr: PhysicalAddress,
num_frames: usize
) -> Result<AllocatedFrames<Page4K>, &'static str>
Expand description
Allocates the given number of frames starting at (inclusive of) the frame containing the given PhysicalAddress
.
diff --git a/doc/frame_allocator/fn.allocate_frames_by_bytes.html b/doc/frame_allocator/fn.allocate_frames_by_bytes.html
index 84205bb8e1..ded19fc03d 100644
--- a/doc/frame_allocator/fn.allocate_frames_by_bytes.html
+++ b/doc/frame_allocator/fn.allocate_frames_by_bytes.html
@@ -1,4 +1,4 @@
-allocate_frames_by_bytes in frame_allocator - Rust Function frame_allocator::allocate_frames_by_bytes
source · pub fn allocate_frames_by_bytes(
+allocate_frames_by_bytes in frame_allocator - Rust Function frame_allocator::allocate_frames_by_bytes
source · pub fn allocate_frames_by_bytes(
num_bytes: usize
) -> Option<AllocatedFrames<Page4K>>
Expand description
Allocates frames with no constraints on the starting physical address,
with a size given by the number of bytes.
diff --git a/doc/frame_allocator/fn.allocate_frames_by_bytes_at.html b/doc/frame_allocator/fn.allocate_frames_by_bytes_at.html
index ff8127b949..5dc4ff9214 100644
--- a/doc/frame_allocator/fn.allocate_frames_by_bytes_at.html
+++ b/doc/frame_allocator/fn.allocate_frames_by_bytes_at.html
@@ -1,4 +1,4 @@
-allocate_frames_by_bytes_at in frame_allocator - Rust Function frame_allocator::allocate_frames_by_bytes_at
source · pub fn allocate_frames_by_bytes_at(
+allocate_frames_by_bytes_at in frame_allocator - Rust Function frame_allocator::allocate_frames_by_bytes_at
source · pub fn allocate_frames_by_bytes_at(
paddr: PhysicalAddress,
num_bytes: usize
) -> Result<AllocatedFrames<Page4K>, &'static str>
Expand description
Allocates frames starting at the given PhysicalAddress
with a size given in number of bytes.
diff --git a/doc/frame_allocator/fn.allocate_frames_by_bytes_deferred.html b/doc/frame_allocator/fn.allocate_frames_by_bytes_deferred.html
index 9544f69826..cdbc6491fc 100644
--- a/doc/frame_allocator/fn.allocate_frames_by_bytes_deferred.html
+++ b/doc/frame_allocator/fn.allocate_frames_by_bytes_deferred.html
@@ -1,4 +1,4 @@
-allocate_frames_by_bytes_deferred in frame_allocator - Rust pub fn allocate_frames_by_bytes_deferred(
+allocate_frames_by_bytes_deferred in frame_allocator - Rust pub fn allocate_frames_by_bytes_deferred(
requested_paddr: Option<PhysicalAddress>,
num_bytes: usize
) -> Result<(AllocatedFrames<Page4K>, DeferredAllocAction<'static>), &'static str>
Expand description
Similar to allocated_frames_deferred()
,
diff --git a/doc/frame_allocator/fn.allocate_frames_deferred.html b/doc/frame_allocator/fn.allocate_frames_deferred.html
index 76c710d655..875b1f387d 100644
--- a/doc/frame_allocator/fn.allocate_frames_deferred.html
+++ b/doc/frame_allocator/fn.allocate_frames_deferred.html
@@ -1,4 +1,4 @@
-
allocate_frames_deferred in frame_allocator - Rust Function frame_allocator::allocate_frames_deferred
source · pub fn allocate_frames_deferred(
+allocate_frames_deferred in frame_allocator - Rust Function frame_allocator::allocate_frames_deferred
source · pub fn allocate_frames_deferred(
requested_paddr: Option<PhysicalAddress>,
num_frames: usize
) -> Result<(AllocatedFrames<Page4K>, DeferredAllocAction<'static>), &'static str>
Expand description
The core frame allocation routine that allocates the given number of physical frames,
diff --git a/doc/frame_allocator/fn.inspect_then_allocate_free_frames.html b/doc/frame_allocator/fn.inspect_then_allocate_free_frames.html
index a5b3dab0ed..efd8f386e7 100644
--- a/doc/frame_allocator/fn.inspect_then_allocate_free_frames.html
+++ b/doc/frame_allocator/fn.inspect_then_allocate_free_frames.html
@@ -1,4 +1,4 @@
-
inspect_then_allocate_free_frames in frame_allocator - Rust pub fn inspect_then_allocate_free_frames<F>(
+inspect_then_allocate_free_frames in frame_allocator - Rust pub fn inspect_then_allocate_free_frames<F>(
func: &mut F
) -> Result<Option<AllocatedFrames<Page4K>>, &'static str>where
F: FnMut(&FreeFrames) -> FramesIteratorRequest,
Expand description
Iterates over all free frames and invokes the given func
on each one
diff --git a/doc/frame_allocator/index.html b/doc/frame_allocator/index.html
index 7eeae669c0..dbcaae0988 100644
--- a/doc/frame_allocator/index.html
+++ b/doc/frame_allocator/index.html
@@ -1,5 +1,5 @@
frame_allocator - Rust Crate frame_allocator
source · Expand description
Crate frame_allocator
source · Expand description
Provides an allocator for physical memory frames.
The minimum unit of allocation is a single frame.
This is currently a modified and more complex version of the page_allocator
crate.
TODO: extract the common code and create a generic allocator that can be specialized to allocate pages or frames.
diff --git a/doc/frame_allocator/struct.AllocatedFrame.html b/doc/frame_allocator/struct.AllocatedFrame.html
index 693ef83202..6780fae7fd 100644
--- a/doc/frame_allocator/struct.AllocatedFrame.html
+++ b/doc/frame_allocator/struct.AllocatedFrame.html
@@ -1,10 +1,10 @@
-AllocatedFrame in frame_allocator - Rust Struct frame_allocator::AllocatedFrame
source · pub struct AllocatedFrame<'f, P: PageSize> { /* private fields */ }
Expand description
A reference to a single frame within a range of AllocatedFrames
.
+AllocatedFrame in frame_allocator - Rust Struct frame_allocator::AllocatedFrame
source · pub struct AllocatedFrame<'f, P: PageSize> { /* private fields */ }
Expand description
A reference to a single frame within a range of AllocatedFrames
.
The lifetime of this type is tied to the lifetime of its owning AllocatedFrames
.
Methods from Deref<Target = Frame<P>>§
pub fn align_up(&self, alignment_4k_pages: usize) -> Frame<Page4K>
Returns a new Frame
that is aligned up from this Frame
to the nearest multiple of alignment_4k_pages
.
pub const MIN: Frame<P> = _
pub const MAX: Frame<P> = _
pub fn start_address(&self) -> PhysicalAddress
Returns the PhysicalAddress
at the start of this Frame
.
pub fn page_size(&self) -> MemChunkSize
Returns the size of this Frame
.
-Trait Implementations§
source§impl<'f, P: Debug + PageSize> Debug for AllocatedFrame<'f, P>
Auto Trait Implementations§
§impl<'f, P> RefUnwindSafe for AllocatedFrame<'f, P>where
+
Trait Implementations§
source§impl<'f, P: Debug + PageSize> Debug for AllocatedFrame<'f, P>
Auto Trait Implementations§
§impl<'f, P> RefUnwindSafe for AllocatedFrame<'f, P>where
P: RefUnwindSafe,
§impl<'f, P> Send for AllocatedFrame<'f, P>where
P: Send,
§impl<'f, P> Sync for AllocatedFrame<'f, P>where
P: Sync,
§impl<'f, P> Unpin for AllocatedFrame<'f, P>where
diff --git a/doc/frame_allocator/struct.AllocatedFramesIter.html b/doc/frame_allocator/struct.AllocatedFramesIter.html
index d17eda6783..5044b03ca0 100644
--- a/doc/frame_allocator/struct.AllocatedFramesIter.html
+++ b/doc/frame_allocator/struct.AllocatedFramesIter.html
@@ -1,11 +1,11 @@
-AllocatedFramesIter in frame_allocator - Rust Struct frame_allocator::AllocatedFramesIter
source · pub struct AllocatedFramesIter<'f, P: PageSize> { /* private fields */ }
Expand description
An iterator over each AllocatedFrame
in a range of AllocatedFrames
.
+AllocatedFramesIter in frame_allocator - Rust Struct frame_allocator::AllocatedFramesIter
source · pub struct AllocatedFramesIter<'f, P: PageSize> { /* private fields */ }
Expand description
An iterator over each AllocatedFrame
in a range of AllocatedFrames
.
We must implement our own iterator type here in order to tie the lifetime 'f
of a returned AllocatedFrame<'f>
type to the lifetime of its containing AllocatedFrames
.
This is because the underlying type of AllocatedFrames
is a [FrameRange
],
which itself is a RangeInclusive
of [Frame
]s.
Currently, the [RangeInclusiveIterator
] type creates a clone of the original
RangeInclusive
instances rather than borrowing a reference to it.
-Trait Implementations§
source§impl<'f, P: PageSize> Iterator for AllocatedFramesIter<'f, P>
Trait Implementations§
source§impl<'f, P: PageSize> Iterator for AllocatedFramesIter<'f, P>
§type Item = AllocatedFrame<'f, P>
The type of the elements being iterated over.source§fn next(&mut self) -> Option<Self::Item>
Advances the iterator and returns the next value. Read moresource§fn next_chunk<const N: usize>(
&mut self
) -> Result<[Self::Item; N], IntoIter<Self::Item, N>>where
Self: Sized,
🔬This is a nightly-only experimental API. (iter_next_chunk
)Advances the iterator and returns an array containing the next N
values. Read more1.0.0 · source§fn size_hint(&self) -> (usize, Option<usize>)
Returns the bounds on the remaining length of the iterator. Read more1.0.0 · source§fn count(self) -> usizewhere
diff --git a/doc/frame_allocator/struct.DeferredAllocAction.html b/doc/frame_allocator/struct.DeferredAllocAction.html
index 1e47fcfa46..0a141b169f 100644
--- a/doc/frame_allocator/struct.DeferredAllocAction.html
+++ b/doc/frame_allocator/struct.DeferredAllocAction.html
@@ -1,4 +1,4 @@
-DeferredAllocAction in frame_allocator - Rust Struct frame_allocator::DeferredAllocAction
source · pub struct DeferredAllocAction<'list> { /* private fields */ }
Expand description
A series of pending actions related to frame allocator bookkeeping,
+
DeferredAllocAction in frame_allocator - Rust Struct frame_allocator::DeferredAllocAction
source · pub struct DeferredAllocAction<'list> { /* private fields */ }
Expand description
A series of pending actions related to frame allocator bookkeeping,
which may result in heap allocation.
The actions are triggered upon dropping this struct.
This struct can be returned from the allocate_frames()
family of functions
@@ -8,7 +8,7 @@
The vast majority of use cases don’t care about such precise control,
so you can simply drop this struct at any time or ignore it
with a let _ = ...
binding to instantly drop it.
-Trait Implementations§
Auto Trait Implementations§
§impl<'list> !RefUnwindSafe for DeferredAllocAction<'list>
§impl<'list> Send for DeferredAllocAction<'list>
§impl<'list> Sync for DeferredAllocAction<'list>
§impl<'list> Unpin for DeferredAllocAction<'list>
§impl<'list> !UnwindSafe for DeferredAllocAction<'list>
Blanket Implementations§
Trait Implementations§
Auto Trait Implementations§
§impl<'list> !RefUnwindSafe for DeferredAllocAction<'list>
§impl<'list> Send for DeferredAllocAction<'list>
§impl<'list> Sync for DeferredAllocAction<'list>
§impl<'list> Unpin for DeferredAllocAction<'list>
§impl<'list> !UnwindSafe for DeferredAllocAction<'list>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moresource§impl<T> From<T> for T
source§fn from(t: T) -> T
Returns the argument unchanged.
diff --git a/doc/frame_allocator/struct.Frames.html b/doc/frame_allocator/struct.Frames.html
index 1b2d149755..0249c35cee 100644
--- a/doc/frame_allocator/struct.Frames.html
+++ b/doc/frame_allocator/struct.Frames.html
@@ -1,4 +1,4 @@
-Frames in frame_allocator - Rust Struct frame_allocator::Frames
source · pub struct Frames<const S: MemoryState, P: PageSize = Page4K> { /* private fields */ }
Expand description
A range of contiguous frames in physical memory.
+Frames in frame_allocator - Rust Struct frame_allocator::Frames
source · pub struct Frames<const S: MemoryState, P: PageSize = Page4K> { /* private fields */ }
Expand description
A range of contiguous frames in physical memory.
Each Frames
object is globally unique, meaning that the owner of a Frames
object
has globally-exclusive access to the range of frames it contains.
A Frames
object can be in one of four states:
@@ -32,22 +32,22 @@ Ordering and Equ
not a FrameRange
. This is required so we can search for Frames
in a sorted collection
using a Frame
value.
It differs from the behavior of the Deref
trait which returns a FrameRange
.
-
Implementations§
source§impl Frames<{MemoryState::Free}, Page4K>
sourcepub fn into_allocated_frames(self) -> AllocatedFrames<Page4K>
Consumes this Frames
in the Free
state and converts them into the Allocated
state.
-source§impl<P: PageSize> Frames<{MemoryState::Allocated}, P>
sourcepub fn into_mapped_frames(self) -> MappedFrames<P>
Consumes this Frames
in the Allocated
state and converts them into the Mapped
state.
+
Implementations§
source§impl Frames<{MemoryState::Free}, Page4K>
sourcepub fn into_allocated_frames(self) -> AllocatedFrames<Page4K>
Consumes this Frames
in the Free
state and converts them into the Allocated
state.
+source§impl<P: PageSize> Frames<{MemoryState::Allocated}, P>
sourcepub fn into_mapped_frames(self) -> MappedFrames<P>
Consumes this Frames
in the Allocated
state and converts them into the Mapped
state.
This should only be called once a MappedPages
has been created from the Frames
.
-sourcepub fn as_allocated_frame(&self) -> AllocatedFrame<'_, P>
Returns an AllocatedFrame
if this AllocatedFrames
object contains only one frame.
+sourcepub fn as_allocated_frame(&self) -> AllocatedFrame<'_, P>
Returns an AllocatedFrame
if this AllocatedFrames
object contains only one frame.
Panic
Panics if this AllocatedFrame
contains multiple frames or zero frames.
-source§impl Frames<{MemoryState::Unmapped}, Page4K>
sourcepub fn into_allocated_frames(self) -> AllocatedFrames
Consumes this Frames
in the Unmapped
state and converts them into the Allocated
state.
-source§impl Frames<{MemoryState::Unmapped}, Page4K>
sourcepub fn into_allocated_frames(self) -> AllocatedFrames
Consumes this Frames
in the Unmapped
state and converts them into the Allocated
state.
+source§impl<const S: MemoryState, P: PageSize> Frames<S, P>
sourcepub const fn empty() -> Frames<S, P>
Returns a new Frames
with an empty range of frames.
Can be used as a placeholder, but will not permit any real usage.
-sourcepub fn merge(&mut self, other: Self) -> Result<(), Self>
Merges the given other
Frames
object into this Frames
object (self
).
+sourcepub fn merge(&mut self, other: Self) -> Result<(), Self>
Merges the given other
Frames
object into this Frames
object (self
).
This function performs no allocation or re-mapping, it exists for convenience and usability purposes.
The given other
must be physically contiguous with self
, i.e., come immediately before or after self
.
That is, either self.start == other.end + 1
or self.end + 1 == other.start
must be true.
If either of those conditions are met, self
is modified and Ok(())
is returned,
otherwise Err(other)
is returned.
-sourcepub fn split_range(
+
sourcepub fn split_range(
self,
frames_to_extract: FrameRange<P>
) -> Result<SplitFrames<S, P>, Self>
Splits up the given Frames
into multiple smaller Frames
.
@@ -58,7 +58,7 @@ Panic
The range of frames in self
that are after the end of frames_to_extract
.
If frames_to_extract
is not contained within self
, then self
is returned unchanged within an Err
.
-sourcepub fn split_at(self, at_frame: Frame<P>) -> Result<(Self, Self), Self>
Splits this Frames
into two separate Frames
objects:
+sourcepub fn split_at(self, at_frame: Frame<P>) -> Result<(Self, Self), Self>
Splits this Frames
into two separate Frames
objects:
[beginning : at_frame - 1]
[at_frame : end]
@@ -96,14 +96,14 @@ Examples
sourcepub fn contains<U>(&self, item: &U) -> boolwhere
Idx: PartialOrd<U>,
U: PartialOrd<Idx> + ?Sized,
Returns true
if item
is contained in the range.
-Trait Implementations§
Trait Implementations§
source§impl<const S: MemoryState, P: PageSize> Ord for Frames<S, P>
source§impl<const S: MemoryState, P: PageSize> PartialEq<Frames<S, P>> for Frames<S, P>
source§fn eq(&self, other: &Self) -> bool
This method tests for self
and other
values to be equal, and is used
+ Self: Sized + PartialOrd<Self>,Restrict a value to a certain interval. Read moresource§impl<const S: MemoryState, P: PageSize> PartialEq<Frames<S, P>> for Frames<S, P>
source§impl<const S: MemoryState, P: PageSize> PartialOrd<Frames<S, P>> for Frames<S, P>
source§impl<const S: MemoryState, P: PageSize> PartialOrd<Frames<S, P>> for Frames<S, P>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read moresource§impl<const S: MemoryState, P: Eq + PageSize> Eq for Frames<S, P>
source§impl<const S: MemoryState, P: PageSize> StructuralEq for Frames<S, P>
Auto Trait Implementations§
§impl<const S: MemoryState, P> RefUnwindSafe for Frames<S, P>where
+operator. Read more
source§impl<const S: MemoryState, P: Eq + PageSize> Eq for Frames<S, P>
source§impl<const S: MemoryState, P: PageSize> StructuralEq for Frames<S, P>
Auto Trait Implementations§
§impl<const S: MemoryState, P> RefUnwindSafe for Frames<S, P>where
P: RefUnwindSafe,
§impl<const S: MemoryState, P> Send for Frames<S, P>where
P: Send,
§impl<const S: MemoryState, P> Sync for Frames<S, P>where
P: Sync,
§impl<const S: MemoryState, P> Unpin for Frames<S, P>where
diff --git a/doc/frame_allocator/struct.PhysicalMemoryRegion.html b/doc/frame_allocator/struct.PhysicalMemoryRegion.html
index a965b40ad8..4cc56a42c6 100644
--- a/doc/frame_allocator/struct.PhysicalMemoryRegion.html
+++ b/doc/frame_allocator/struct.PhysicalMemoryRegion.html
@@ -1,4 +1,4 @@
-PhysicalMemoryRegion in frame_allocator - Rust Struct frame_allocator::PhysicalMemoryRegion
source · pub struct PhysicalMemoryRegion {
+PhysicalMemoryRegion in frame_allocator - Rust Struct frame_allocator::PhysicalMemoryRegion
source · pub struct PhysicalMemoryRegion {
pub frames: FrameRange<Page4K>,
pub typ: MemoryRegionType,
}
Expand description
PhysicalMemoryRegion
represents a range of contiguous frames in physical memory for bookkeeping purposes.
@@ -12,7 +12,7 @@
Ordering and Equ
since it ignores their actual range of frames.
Fields§
§frames: FrameRange<Page4K>
The Frames covered by this region, an inclusive range.
§typ: MemoryRegionType
The type of this memory region, e.g., whether it’s in a free or reserved region.
-Implementations§
source§impl PhysicalMemoryRegion
sourcepub fn new(frames: FrameRange, typ: MemoryRegionType) -> PhysicalMemoryRegion
Methods from Deref<Target = FrameRange>§
pub fn start(&self) -> &Frame<P>
Returns the starting [Frame
] in this FrameRange
.
+Implementations§
source§impl PhysicalMemoryRegion
sourcepub fn new(frames: FrameRange, typ: MemoryRegionType) -> PhysicalMemoryRegion
Methods from Deref<Target = FrameRange>§
pub fn start(&self) -> &Frame<P>
Returns the starting [Frame
] in this FrameRange
.
pub fn end(&self) -> &Frame<P>
Returns the ending [Frame
] in this FrameRange
.
pub fn start_address(&self) -> PhysicalAddress
Returns the [PhysicalAddress
] of the starting [Frame
] in this FrameRange
.
pub fn size_in_frames(&self) -> usize
Returns the number of [Frame
]s covered by this iterator.
@@ -38,14 +38,14 @@ Examples
sourcepub fn contains<U>(&self, item: &U) -> boolwhere
Idx: PartialOrd<U>,
U: PartialOrd<Idx> + ?Sized,
Returns true
if item
is contained in the range.
-Trait Implementations§
source§impl Borrow<Frame<Page4K>> for &PhysicalMemoryRegion
source§impl Clone for PhysicalMemoryRegion
source§fn clone(&self) -> PhysicalMemoryRegion
Returns a copy of the value. Read more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read moresource§impl Debug for PhysicalMemoryRegion
source§impl Deref for PhysicalMemoryRegion
Trait Implementations§
source§impl Borrow<Frame<Page4K>> for &PhysicalMemoryRegion
source§impl Clone for PhysicalMemoryRegion
source§fn clone(&self) -> PhysicalMemoryRegion
Returns a copy of the value. Read more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read moresource§impl Debug for PhysicalMemoryRegion
source§impl Deref for PhysicalMemoryRegion
source§impl Ord for PhysicalMemoryRegion
source§impl PartialEq<PhysicalMemoryRegion> for PhysicalMemoryRegion
source§fn eq(&self, other: &Self) -> bool
This method tests for self
and other
values to be equal, and is used
+ Self: Sized + PartialOrd<Self>,Restrict a value to a certain interval. Read moresource§impl PartialEq<PhysicalMemoryRegion> for PhysicalMemoryRegion
source§impl PartialOrd<PhysicalMemoryRegion> for PhysicalMemoryRegion
source§impl PartialOrd<PhysicalMemoryRegion> for PhysicalMemoryRegion
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read moresource§impl Eq for PhysicalMemoryRegion
source§impl StructuralEq for PhysicalMemoryRegion
Auto Trait Implementations§
§impl RefUnwindSafe for PhysicalMemoryRegion
§impl Send for PhysicalMemoryRegion
§impl Sync for PhysicalMemoryRegion
§impl Unpin for PhysicalMemoryRegion
§impl UnwindSafe for PhysicalMemoryRegion
Blanket Implementations§
source§impl Eq for PhysicalMemoryRegion
source§impl StructuralEq for PhysicalMemoryRegion
Auto Trait Implementations§
§impl RefUnwindSafe for PhysicalMemoryRegion
§impl Send for PhysicalMemoryRegion
§impl Sync for PhysicalMemoryRegion
§impl Unpin for PhysicalMemoryRegion
§impl UnwindSafe for PhysicalMemoryRegion
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moresource§impl<T> From<T> for T
source§fn from(t: T) -> T
Returns the argument unchanged.
diff --git a/doc/frame_allocator/struct.SplitFrames.html b/doc/frame_allocator/struct.SplitFrames.html
index 9767eaec16..0c4580c2bc 100644
--- a/doc/frame_allocator/struct.SplitFrames.html
+++ b/doc/frame_allocator/struct.SplitFrames.html
@@ -1,4 +1,4 @@
-SplitFrames in frame_allocator - Rust Struct frame_allocator::SplitFrames
source · pub struct SplitFrames<const S: MemoryState, P: PageSize> { /* private fields */ }
Expand description
The result of splitting a Frames
object into multiple smaller Frames
objects.
+SplitFrames in frame_allocator - Rust Struct frame_allocator::SplitFrames
source · pub struct SplitFrames<const S: MemoryState, P: PageSize> { /* private fields */ }
Expand description
The result of splitting a Frames
object into multiple smaller Frames
objects.
Auto Trait Implementations§
§impl<const S: MemoryState, P> RefUnwindSafe for SplitFrames<S, P>where
P: RefUnwindSafe,
§impl<const S: MemoryState, P> Send for SplitFrames<S, P>where
P: Send,
§impl<const S: MemoryState, P> Sync for SplitFrames<S, P>where
diff --git a/doc/frame_allocator/type.AllocatedFrames.html b/doc/frame_allocator/type.AllocatedFrames.html
index 7c747e1e9c..1eaf61e581 100644
--- a/doc/frame_allocator/type.AllocatedFrames.html
+++ b/doc/frame_allocator/type.AllocatedFrames.html
@@ -1,20 +1,20 @@
-AllocatedFrames in frame_allocator - Rust Type Alias frame_allocator::AllocatedFrames
source · pub type AllocatedFrames<P: PageSize = Page4K> = Frames<{ MemoryState::Allocated }, P>;
Expand description
A type alias for Frames
in the Allocated
state.
-Aliased Type§
struct AllocatedFrames<P: PageSize = Page4K> { /* private fields */ }
Implementations§
source§impl<P: PageSize> AllocatedFrames<P>
sourcepub fn into_mapped_frames(self) -> MappedFrames<P>
Consumes this Frames
in the Allocated
state and converts them into the Mapped
state.
+
AllocatedFrames in frame_allocator - Rust Type Alias frame_allocator::AllocatedFrames
source · pub type AllocatedFrames<P: PageSize = Page4K> = Frames<{ MemoryState::Allocated }, P>;
Expand description
A type alias for Frames
in the Allocated
state.
+Aliased Type§
struct AllocatedFrames<P: PageSize = Page4K> { /* private fields */ }
Implementations§
source§impl<P: PageSize> AllocatedFrames<P>
sourcepub fn into_mapped_frames(self) -> MappedFrames<P>
Consumes this Frames
in the Allocated
state and converts them into the Mapped
state.
This should only be called once a MappedPages
has been created from the Frames
.
-sourcepub fn as_allocated_frame(&self) -> AllocatedFrame<'_, P>
Returns an AllocatedFrame
if this AllocatedFrames
object contains only one frame.
+sourcepub fn as_allocated_frame(&self) -> AllocatedFrame<'_, P>
Returns an AllocatedFrame
if this AllocatedFrames
object contains only one frame.
Panic
Panics if this AllocatedFrame
contains multiple frames or zero frames.
-source§impl Frames<{MemoryState::Free}, Page4K>
sourcepub fn into_allocated_frames(self) -> AllocatedFrames<Page4K>
Consumes this Frames
in the Free
state and converts them into the Allocated
state.
-source§impl Frames<{MemoryState::Unmapped}, Page4K>
sourcepub fn into_allocated_frames(self) -> AllocatedFrames
Consumes this Frames
in the Unmapped
state and converts them into the Allocated
state.
-source§impl Frames<{MemoryState::Free}, Page4K>
sourcepub fn into_allocated_frames(self) -> AllocatedFrames<Page4K>
Consumes this Frames
in the Free
state and converts them into the Allocated
state.
+source§impl Frames<{MemoryState::Unmapped}, Page4K>
sourcepub fn into_allocated_frames(self) -> AllocatedFrames
Consumes this Frames
in the Unmapped
state and converts them into the Allocated
state.
+source§impl<const S: MemoryState, P: PageSize> Frames<S, P>
sourcepub const fn empty() -> Frames<S, P>
Returns a new Frames
with an empty range of frames.
Can be used as a placeholder, but will not permit any real usage.
-sourcepub fn merge(&mut self, other: Self) -> Result<(), Self>
Merges the given other
Frames
object into this Frames
object (self
).
+sourcepub fn merge(&mut self, other: Self) -> Result<(), Self>
Merges the given other
Frames
object into this Frames
object (self
).
This function performs no allocation or re-mapping, it exists for convenience and usability purposes.
The given other
must be physically contiguous with self
, i.e., come immediately before or after self
.
That is, either self.start == other.end + 1
or self.end + 1 == other.start
must be true.
If either of those conditions are met, self
is modified and Ok(())
is returned,
otherwise Err(other)
is returned.
-sourcepub fn split_range(
+
sourcepub fn split_range(
self,
frames_to_extract: FrameRange<P>
) -> Result<SplitFrames<S, P>, Self>
Splits up the given Frames
into multiple smaller Frames
.
@@ -25,7 +25,7 @@ Panic
The range of frames in self
that are after the end of frames_to_extract
.
If frames_to_extract
is not contained within self
, then self
is returned unchanged within an Err
.
-sourcepub fn split_at(self, at_frame: Frame<P>) -> Result<(Self, Self), Self>
Splits this Frames
into two separate Frames
objects:
+sourcepub fn split_at(self, at_frame: Frame<P>) -> Result<(Self, Self), Self>
Splits this Frames
into two separate Frames
objects:
[beginning : at_frame - 1]
[at_frame : end]
@@ -56,7 +56,7 @@ Examples
pub fn contains_range(&self, other: &FrameRange<P>) -> bool
Returns true
if the other
FrameRange
is fully contained within this FrameRange
.
pub fn overlap(&self, other: &FrameRange<P>) -> Option<FrameRange<P>>
Returns an inclusive FrameRange
representing the [Frame
]s that overlap across this FrameRange
and the given other FrameRange
.
If there is no overlap between the two ranges, None
is returned.
-sourcepub fn as_allocated_frame(&self) -> AllocatedFrame<'_, P>
Returns an AllocatedFrame
if this AllocatedFrames
object contains only one frame.
+sourcepub fn as_allocated_frame(&self) -> AllocatedFrame<'_, P>
Returns an AllocatedFrame
if this AllocatedFrames
object contains only one frame.
Panic
Panics if this AllocatedFrame
contains multiple frames or zero frames.
Methods from Deref<Target = RangeInclusive<Frame<P>>>§
sourcepub fn start(&self) -> &Idx
Returns the lower bound of the range (inclusive).
@@ -66,20 +66,20 @@ Panic
sourcepub fn contains<U>(&self, item: &U) -> boolwhere
Idx: PartialOrd<U>,
U: PartialOrd<Idx> + ?Sized,
Returns true
if item
is contained in the range.
-sourcepub fn as_allocated_frame(&self) -> AllocatedFrame<'_, P>
Returns an AllocatedFrame
if this AllocatedFrames
object contains only one frame.
+sourcepub fn as_allocated_frame(&self) -> AllocatedFrame<'_, P>
Returns an AllocatedFrame
if this AllocatedFrames
object contains only one frame.
Panic
Panics if this AllocatedFrame
contains multiple frames or zero frames.
-sourcepub fn merge(&mut self, other: Self) -> Result<(), Self>
Merges the given other
Frames
object into this Frames
object (self
).
+sourcepub fn merge(&mut self, other: Self) -> Result<(), Self>
Merges the given other
Frames
object into this Frames
object (self
).
This function performs no allocation or re-mapping, it exists for convenience and usability purposes.
The given other
must be physically contiguous with self
, i.e., come immediately before or after self
.
That is, either self.start == other.end + 1
or self.end + 1 == other.start
must be true.
If either of those conditions are met, self
is modified and Ok(())
is returned,
otherwise Err(other)
is returned.
-Trait Implementations§
source§impl<'f, P: PageSize> IntoIterator for &'f AllocatedFrames<P>
Trait Implementations§
source§impl<'f, P: PageSize> IntoIterator for &'f AllocatedFrames<P>
source§impl<const S: MemoryState, P: PageSize> Ord for Frames<S, P>
source§impl<const S: MemoryState, P: PageSize> PartialEq<Frames<S, P>> for Frames<S, P>
source§fn eq(&self, other: &Self) -> bool
This method tests for self
and other
values to be equal, and is used
+ Self: Sized + PartialOrd<Self>,Restrict a value to a certain interval. Read moresource§impl<const S: MemoryState, P: PageSize> PartialEq<Frames<S, P>> for Frames<S, P>
source§impl<const S: MemoryState, P: PageSize> PartialOrd<Frames<S, P>> for Frames<S, P>
source§impl<const S: MemoryState, P: PageSize> PartialOrd<Frames<S, P>> for Frames<S, P>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read moresource§impl<const S: MemoryState, P: Eq + PageSize> Eq for Frames<S, P>
source§impl<const S: MemoryState, P: PageSize> StructuralEq for Frames<S, P>
\ No newline at end of file
+operator. Read moresource§impl<const S: MemoryState, P: Eq + PageSize> Eq for Frames<S, P>
source§impl<const S: MemoryState, P: PageSize> StructuralEq for Frames<S, P>
\ No newline at end of file
diff --git a/doc/frame_allocator/type.FreeFrames.html b/doc/frame_allocator/type.FreeFrames.html
index 33bea69344..67b09707e0 100644
--- a/doc/frame_allocator/type.FreeFrames.html
+++ b/doc/frame_allocator/type.FreeFrames.html
@@ -1,20 +1,20 @@
-FreeFrames in frame_allocator - Rust Type Alias frame_allocator::FreeFrames
source · pub type FreeFrames = Frames<{ MemoryState::Free }, Page4K>;
Expand description
A type alias for Frames
in the Free
state, which only suppports 4K pages.
-Aliased Type§
struct FreeFrames { /* private fields */ }
Implementations§
source§impl FreeFrames
sourcepub fn into_allocated_frames(self) -> AllocatedFrames<Page4K>
Consumes this Frames
in the Free
state and converts them into the Allocated
state.
-source§impl<P: PageSize> Frames<{MemoryState::Allocated}, P>
sourcepub fn into_mapped_frames(self) -> MappedFrames<P>
Consumes this Frames
in the Allocated
state and converts them into the Mapped
state.
+
FreeFrames in frame_allocator - Rust Type Alias frame_allocator::FreeFrames
source · pub type FreeFrames = Frames<{ MemoryState::Free }, Page4K>;
Expand description
A type alias for Frames
in the Free
state, which only suppports 4K pages.
+Aliased Type§
struct FreeFrames { /* private fields */ }
Implementations§
source§impl FreeFrames
sourcepub fn into_allocated_frames(self) -> AllocatedFrames<Page4K>
Consumes this Frames
in the Free
state and converts them into the Allocated
state.
+source§impl<P: PageSize> Frames<{MemoryState::Allocated}, P>
sourcepub fn into_mapped_frames(self) -> MappedFrames<P>
Consumes this Frames
in the Allocated
state and converts them into the Mapped
state.
This should only be called once a MappedPages
has been created from the Frames
.
-sourcepub fn as_allocated_frame(&self) -> AllocatedFrame<'_, P>
Returns an AllocatedFrame
if this AllocatedFrames
object contains only one frame.
+sourcepub fn as_allocated_frame(&self) -> AllocatedFrame<'_, P>
Returns an AllocatedFrame
if this AllocatedFrames
object contains only one frame.
Panic
Panics if this AllocatedFrame
contains multiple frames or zero frames.
-source§impl Frames<{MemoryState::Unmapped}, Page4K>
sourcepub fn into_allocated_frames(self) -> AllocatedFrames
Consumes this Frames
in the Unmapped
state and converts them into the Allocated
state.
-source§impl Frames<{MemoryState::Unmapped}, Page4K>
sourcepub fn into_allocated_frames(self) -> AllocatedFrames
Consumes this Frames
in the Unmapped
state and converts them into the Allocated
state.
+source§impl<const S: MemoryState, P: PageSize> Frames<S, P>
sourcepub const fn empty() -> Frames<S, P>
Returns a new Frames
with an empty range of frames.
Can be used as a placeholder, but will not permit any real usage.
-sourcepub fn merge(&mut self, other: Self) -> Result<(), Self>
Merges the given other
Frames
object into this Frames
object (self
).
+sourcepub fn merge(&mut self, other: Self) -> Result<(), Self>
Merges the given other
Frames
object into this Frames
object (self
).
This function performs no allocation or re-mapping, it exists for convenience and usability purposes.
The given other
must be physically contiguous with self
, i.e., come immediately before or after self
.
That is, either self.start == other.end + 1
or self.end + 1 == other.start
must be true.
If either of those conditions are met, self
is modified and Ok(())
is returned,
otherwise Err(other)
is returned.
-sourcepub fn split_range(
+
sourcepub fn split_range(
self,
frames_to_extract: FrameRange<P>
) -> Result<SplitFrames<S, P>, Self>
Splits up the given Frames
into multiple smaller Frames
.
@@ -25,7 +25,7 @@ Panic
The range of frames in self
that are after the end of frames_to_extract
.
If frames_to_extract
is not contained within self
, then self
is returned unchanged within an Err
.
-sourcepub fn split_at(self, at_frame: Frame<P>) -> Result<(Self, Self), Self>
Splits this Frames
into two separate Frames
objects:
+sourcepub fn split_at(self, at_frame: Frame<P>) -> Result<(Self, Self), Self>
Splits this Frames
into two separate Frames
objects:
[beginning : at_frame - 1]
[at_frame : end]
@@ -56,7 +56,7 @@ Examples
pub fn contains_range(&self, other: &FrameRange<P>) -> bool
Returns true
if the other
FrameRange
is fully contained within this FrameRange
.
pub fn overlap(&self, other: &FrameRange<P>) -> Option<FrameRange<P>>
Returns an inclusive FrameRange
representing the [Frame
]s that overlap across this FrameRange
and the given other FrameRange
.
If there is no overlap between the two ranges, None
is returned.
-sourcepub fn as_allocated_frame(&self) -> AllocatedFrame<'_, P>
Returns an AllocatedFrame
if this AllocatedFrames
object contains only one frame.
+sourcepub fn as_allocated_frame(&self) -> AllocatedFrame<'_, P>
Returns an AllocatedFrame
if this AllocatedFrames
object contains only one frame.
Panic
Panics if this AllocatedFrame
contains multiple frames or zero frames.
Methods from Deref<Target = RangeInclusive<Frame<P>>>§
sourcepub fn start(&self) -> &Idx
Returns the lower bound of the range (inclusive).
@@ -66,20 +66,20 @@ Panic
sourcepub fn contains<U>(&self, item: &U) -> boolwhere
Idx: PartialOrd<U>,
U: PartialOrd<Idx> + ?Sized,
Returns true
if item
is contained in the range.
-sourcepub fn as_allocated_frame(&self) -> AllocatedFrame<'_, P>
Returns an AllocatedFrame
if this AllocatedFrames
object contains only one frame.
+sourcepub fn as_allocated_frame(&self) -> AllocatedFrame<'_, P>
Returns an AllocatedFrame
if this AllocatedFrames
object contains only one frame.
Panic
Panics if this AllocatedFrame
contains multiple frames or zero frames.
-sourcepub fn merge(&mut self, other: Self) -> Result<(), Self>
Merges the given other
Frames
object into this Frames
object (self
).
+sourcepub fn merge(&mut self, other: Self) -> Result<(), Self>
Merges the given other
Frames
object into this Frames
object (self
).
This function performs no allocation or re-mapping, it exists for convenience and usability purposes.
The given other
must be physically contiguous with self
, i.e., come immediately before or after self
.
That is, either self.start == other.end + 1
or self.end + 1 == other.start
must be true.
If either of those conditions are met, self
is modified and Ok(())
is returned,
otherwise Err(other)
is returned.
-Trait Implementations§
Trait Implementations§
source§impl<const S: MemoryState, P: PageSize> Ord for Frames<S, P>
source§impl<const S: MemoryState, P: PageSize> PartialEq<Frames<S, P>> for Frames<S, P>
source§fn eq(&self, other: &Self) -> bool
This method tests for self
and other
values to be equal, and is used
+ Self: Sized + PartialOrd<Self>,Restrict a value to a certain interval. Read moresource§impl<const S: MemoryState, P: PageSize> PartialEq<Frames<S, P>> for Frames<S, P>
source§impl<const S: MemoryState, P: PageSize> PartialOrd<Frames<S, P>> for Frames<S, P>
source§impl<const S: MemoryState, P: PageSize> PartialOrd<Frames<S, P>> for Frames<S, P>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read moresource§impl<const S: MemoryState, P: Eq + PageSize> Eq for Frames<S, P>
source§impl<const S: MemoryState, P: PageSize> StructuralEq for Frames<S, P>
\ No newline at end of file
+operator. Read moresource§impl<const S: MemoryState, P: Eq + PageSize> Eq for Frames<S, P>
source§impl<const S: MemoryState, P: PageSize> StructuralEq for Frames<S, P>
\ No newline at end of file
diff --git a/doc/frame_allocator/type.MappedFrames.html b/doc/frame_allocator/type.MappedFrames.html
index ba43bc63d6..9e0176f785 100644
--- a/doc/frame_allocator/type.MappedFrames.html
+++ b/doc/frame_allocator/type.MappedFrames.html
@@ -1,20 +1,20 @@
-MappedFrames in frame_allocator - Rust Type Alias frame_allocator::MappedFrames
source · pub type MappedFrames<P: PageSize = Page4K> = Frames<{ MemoryState::Mapped }, P>;
Expand description
A type alias for Frames
in the Mapped
state.
-Aliased Type§
struct MappedFrames<P: PageSize = Page4K> { /* private fields */ }
Implementations§
source§impl Frames<{MemoryState::Free}, Page4K>
sourcepub fn into_allocated_frames(self) -> AllocatedFrames<Page4K>
Consumes this Frames
in the Free
state and converts them into the Allocated
state.
-source§impl<P: PageSize> Frames<{MemoryState::Allocated}, P>
sourcepub fn into_mapped_frames(self) -> MappedFrames<P>
Consumes this Frames
in the Allocated
state and converts them into the Mapped
state.
+
MappedFrames in frame_allocator - Rust Type Alias frame_allocator::MappedFrames
source · pub type MappedFrames<P: PageSize = Page4K> = Frames<{ MemoryState::Mapped }, P>;
Expand description
A type alias for Frames
in the Mapped
state.
+Aliased Type§
struct MappedFrames<P: PageSize = Page4K> { /* private fields */ }
Implementations§
source§impl Frames<{MemoryState::Free}, Page4K>
sourcepub fn into_allocated_frames(self) -> AllocatedFrames<Page4K>
Consumes this Frames
in the Free
state and converts them into the Allocated
state.
+source§impl<P: PageSize> Frames<{MemoryState::Allocated}, P>
sourcepub fn into_mapped_frames(self) -> MappedFrames<P>
Consumes this Frames
in the Allocated
state and converts them into the Mapped
state.
This should only be called once a MappedPages
has been created from the Frames
.
-sourcepub fn as_allocated_frame(&self) -> AllocatedFrame<'_, P>
Returns an AllocatedFrame
if this AllocatedFrames
object contains only one frame.
+sourcepub fn as_allocated_frame(&self) -> AllocatedFrame<'_, P>
Returns an AllocatedFrame
if this AllocatedFrames
object contains only one frame.
Panic
Panics if this AllocatedFrame
contains multiple frames or zero frames.
-source§impl Frames<{MemoryState::Unmapped}, Page4K>
sourcepub fn into_allocated_frames(self) -> AllocatedFrames
Consumes this Frames
in the Unmapped
state and converts them into the Allocated
state.
-source§impl Frames<{MemoryState::Unmapped}, Page4K>
sourcepub fn into_allocated_frames(self) -> AllocatedFrames
Consumes this Frames
in the Unmapped
state and converts them into the Allocated
state.
+source§impl<const S: MemoryState, P: PageSize> Frames<S, P>
sourcepub const fn empty() -> Frames<S, P>
Returns a new Frames
with an empty range of frames.
Can be used as a placeholder, but will not permit any real usage.
-sourcepub fn merge(&mut self, other: Self) -> Result<(), Self>
Merges the given other
Frames
object into this Frames
object (self
).
+sourcepub fn merge(&mut self, other: Self) -> Result<(), Self>
Merges the given other
Frames
object into this Frames
object (self
).
This function performs no allocation or re-mapping, it exists for convenience and usability purposes.
The given other
must be physically contiguous with self
, i.e., come immediately before or after self
.
That is, either self.start == other.end + 1
or self.end + 1 == other.start
must be true.
If either of those conditions are met, self
is modified and Ok(())
is returned,
otherwise Err(other)
is returned.
-sourcepub fn split_range(
+
sourcepub fn split_range(
self,
frames_to_extract: FrameRange<P>
) -> Result<SplitFrames<S, P>, Self>
Splits up the given Frames
into multiple smaller Frames
.
@@ -25,7 +25,7 @@ Panic
The range of frames in self
that are after the end of frames_to_extract
.
If frames_to_extract
is not contained within self
, then self
is returned unchanged within an Err
.
-sourcepub fn split_at(self, at_frame: Frame<P>) -> Result<(Self, Self), Self>
Splits this Frames
into two separate Frames
objects:
+sourcepub fn split_at(self, at_frame: Frame<P>) -> Result<(Self, Self), Self>
Splits this Frames
into two separate Frames
objects:
[beginning : at_frame - 1]
[at_frame : end]
@@ -56,7 +56,7 @@ Examples
pub fn contains_range(&self, other: &FrameRange<P>) -> bool
Returns true
if the other
FrameRange
is fully contained within this FrameRange
.
pub fn overlap(&self, other: &FrameRange<P>) -> Option<FrameRange<P>>
Returns an inclusive FrameRange
representing the [Frame
]s that overlap across this FrameRange
and the given other FrameRange
.
If there is no overlap between the two ranges, None
is returned.
-sourcepub fn as_allocated_frame(&self) -> AllocatedFrame<'_, P>
Returns an AllocatedFrame
if this AllocatedFrames
object contains only one frame.
+sourcepub fn as_allocated_frame(&self) -> AllocatedFrame<'_, P>
Returns an AllocatedFrame
if this AllocatedFrames
object contains only one frame.
Panic
Panics if this AllocatedFrame
contains multiple frames or zero frames.
Methods from Deref<Target = RangeInclusive<Frame<P>>>§
sourcepub fn start(&self) -> &Idx
Returns the lower bound of the range (inclusive).
@@ -66,20 +66,20 @@ Panic
sourcepub fn contains<U>(&self, item: &U) -> boolwhere
Idx: PartialOrd<U>,
U: PartialOrd<Idx> + ?Sized,
Returns true
if item
is contained in the range.
-sourcepub fn as_allocated_frame(&self) -> AllocatedFrame<'_, P>
Returns an AllocatedFrame
if this AllocatedFrames
object contains only one frame.
+sourcepub fn as_allocated_frame(&self) -> AllocatedFrame<'_, P>
Returns an AllocatedFrame
if this AllocatedFrames
object contains only one frame.
Panic
Panics if this AllocatedFrame
contains multiple frames or zero frames.
-sourcepub fn merge(&mut self, other: Self) -> Result<(), Self>
Merges the given other
Frames
object into this Frames
object (self
).
+sourcepub fn merge(&mut self, other: Self) -> Result<(), Self>
Merges the given other
Frames
object into this Frames
object (self
).
This function performs no allocation or re-mapping, it exists for convenience and usability purposes.
The given other
must be physically contiguous with self
, i.e., come immediately before or after self
.
That is, either self.start == other.end + 1
or self.end + 1 == other.start
must be true.
If either of those conditions are met, self
is modified and Ok(())
is returned,
otherwise Err(other)
is returned.
-Trait Implementations§
Trait Implementations§
source§impl<const S: MemoryState, P: PageSize> Ord for Frames<S, P>
source§impl<const S: MemoryState, P: PageSize> PartialEq<Frames<S, P>> for Frames<S, P>
source§fn eq(&self, other: &Self) -> bool
This method tests for self
and other
values to be equal, and is used
+ Self: Sized + PartialOrd<Self>,Restrict a value to a certain interval. Read moresource§impl<const S: MemoryState, P: PageSize> PartialEq<Frames<S, P>> for Frames<S, P>
source§impl<const S: MemoryState, P: PageSize> PartialOrd<Frames<S, P>> for Frames<S, P>
source§impl<const S: MemoryState, P: PageSize> PartialOrd<Frames<S, P>> for Frames<S, P>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read moresource§impl<const S: MemoryState, P: Eq + PageSize> Eq for Frames<S, P>
source§impl<const S: MemoryState, P: PageSize> StructuralEq for Frames<S, P>
\ No newline at end of file
+operator. Read moresource§impl<const S: MemoryState, P: Eq + PageSize> Eq for Frames<S, P>
source§impl<const S: MemoryState, P: PageSize> StructuralEq for Frames<S, P>
\ No newline at end of file
diff --git a/doc/frame_allocator/type.UnmappedFrames.html b/doc/frame_allocator/type.UnmappedFrames.html
index 5f8aa80fbe..0b30f60a34 100644
--- a/doc/frame_allocator/type.UnmappedFrames.html
+++ b/doc/frame_allocator/type.UnmappedFrames.html
@@ -1,20 +1,20 @@
-UnmappedFrames in frame_allocator - Rust Type Alias frame_allocator::UnmappedFrames
source · pub type UnmappedFrames<P: PageSize = Page4K> = Frames<{ MemoryState::Unmapped }, P>;
Expand description
A type alias for Frames
in the Unmapped
state.
-Aliased Type§
struct UnmappedFrames<P: PageSize = Page4K> { /* private fields */ }
Implementations§
source§impl UnmappedFrames
sourcepub fn into_allocated_frames(self) -> AllocatedFrames
Consumes this Frames
in the Unmapped
state and converts them into the Allocated
state.
-source§impl Frames<{MemoryState::Free}, Page4K>
sourcepub fn into_allocated_frames(self) -> AllocatedFrames<Page4K>
Consumes this Frames
in the Free
state and converts them into the Allocated
state.
-source§impl<P: PageSize> Frames<{MemoryState::Allocated}, P>
sourcepub fn into_mapped_frames(self) -> MappedFrames<P>
Consumes this Frames
in the Allocated
state and converts them into the Mapped
state.
+
UnmappedFrames in frame_allocator - Rust Type Alias frame_allocator::UnmappedFrames
source · pub type UnmappedFrames<P: PageSize = Page4K> = Frames<{ MemoryState::Unmapped }, P>;
Expand description
A type alias for Frames
in the Unmapped
state.
+Aliased Type§
struct UnmappedFrames<P: PageSize = Page4K> { /* private fields */ }
Implementations§
source§impl UnmappedFrames
sourcepub fn into_allocated_frames(self) -> AllocatedFrames
Consumes this Frames
in the Unmapped
state and converts them into the Allocated
state.
+source§impl Frames<{MemoryState::Free}, Page4K>
sourcepub fn into_allocated_frames(self) -> AllocatedFrames<Page4K>
Consumes this Frames
in the Free
state and converts them into the Allocated
state.
+source§impl<P: PageSize> Frames<{MemoryState::Allocated}, P>
sourcepub fn into_mapped_frames(self) -> MappedFrames<P>
Consumes this Frames
in the Allocated
state and converts them into the Mapped
state.
This should only be called once a MappedPages
has been created from the Frames
.
-sourcepub fn as_allocated_frame(&self) -> AllocatedFrame<'_, P>
Returns an AllocatedFrame
if this AllocatedFrames
object contains only one frame.
+sourcepub fn as_allocated_frame(&self) -> AllocatedFrame<'_, P>
Returns an AllocatedFrame
if this AllocatedFrames
object contains only one frame.
Panic
Panics if this AllocatedFrame
contains multiple frames or zero frames.
-source§impl<const S: MemoryState, P: PageSize> Frames<S, P>
sourcepub const fn empty() -> Frames<S, P>
Returns a new Frames
with an empty range of frames.
Can be used as a placeholder, but will not permit any real usage.
-sourcepub fn merge(&mut self, other: Self) -> Result<(), Self>
Merges the given other
Frames
object into this Frames
object (self
).
+sourcepub fn merge(&mut self, other: Self) -> Result<(), Self>
Merges the given other
Frames
object into this Frames
object (self
).
This function performs no allocation or re-mapping, it exists for convenience and usability purposes.
The given other
must be physically contiguous with self
, i.e., come immediately before or after self
.
That is, either self.start == other.end + 1
or self.end + 1 == other.start
must be true.
If either of those conditions are met, self
is modified and Ok(())
is returned,
otherwise Err(other)
is returned.
-sourcepub fn split_range(
+
sourcepub fn split_range(
self,
frames_to_extract: FrameRange<P>
) -> Result<SplitFrames<S, P>, Self>
Splits up the given Frames
into multiple smaller Frames
.
@@ -25,7 +25,7 @@ Panic
The range of frames in self
that are after the end of frames_to_extract
.
If frames_to_extract
is not contained within self
, then self
is returned unchanged within an Err
.
-sourcepub fn split_at(self, at_frame: Frame<P>) -> Result<(Self, Self), Self>
Splits this Frames
into two separate Frames
objects:
+sourcepub fn split_at(self, at_frame: Frame<P>) -> Result<(Self, Self), Self>
Splits this Frames
into two separate Frames
objects:
[beginning : at_frame - 1]
[at_frame : end]
@@ -56,7 +56,7 @@ Examples
pub fn contains_range(&self, other: &FrameRange<P>) -> bool
Returns true
if the other
FrameRange
is fully contained within this FrameRange
.
pub fn overlap(&self, other: &FrameRange<P>) -> Option<FrameRange<P>>
Returns an inclusive FrameRange
representing the [Frame
]s that overlap across this FrameRange
and the given other FrameRange
.
If there is no overlap between the two ranges, None
is returned.
-sourcepub fn as_allocated_frame(&self) -> AllocatedFrame<'_, P>
Returns an AllocatedFrame
if this AllocatedFrames
object contains only one frame.
+sourcepub fn as_allocated_frame(&self) -> AllocatedFrame<'_, P>
Returns an AllocatedFrame
if this AllocatedFrames
object contains only one frame.
Panic
Panics if this AllocatedFrame
contains multiple frames or zero frames.
Methods from Deref<Target = RangeInclusive<Frame<P>>>§
sourcepub fn start(&self) -> &Idx
Returns the lower bound of the range (inclusive).
@@ -66,20 +66,20 @@ Panic
sourcepub fn contains<U>(&self, item: &U) -> boolwhere
Idx: PartialOrd<U>,
U: PartialOrd<Idx> + ?Sized,
Returns true
if item
is contained in the range.
-sourcepub fn as_allocated_frame(&self) -> AllocatedFrame<'_, P>
Returns an AllocatedFrame
if this AllocatedFrames
object contains only one frame.
+sourcepub fn as_allocated_frame(&self) -> AllocatedFrame<'_, P>
Returns an AllocatedFrame
if this AllocatedFrames
object contains only one frame.
Panic
Panics if this AllocatedFrame
contains multiple frames or zero frames.
-sourcepub fn merge(&mut self, other: Self) -> Result<(), Self>
Merges the given other
Frames
object into this Frames
object (self
).
+sourcepub fn merge(&mut self, other: Self) -> Result<(), Self>
Merges the given other
Frames
object into this Frames
object (self
).
This function performs no allocation or re-mapping, it exists for convenience and usability purposes.
The given other
must be physically contiguous with self
, i.e., come immediately before or after self
.
That is, either self.start == other.end + 1
or self.end + 1 == other.start
must be true.
If either of those conditions are met, self
is modified and Ok(())
is returned,
otherwise Err(other)
is returned.
-Trait Implementations§
Trait Implementations§
source§impl<const S: MemoryState, P: PageSize> Ord for Frames<S, P>
source§impl<const S: MemoryState, P: PageSize> PartialEq<Frames<S, P>> for Frames<S, P>
source§fn eq(&self, other: &Self) -> bool
This method tests for self
and other
values to be equal, and is used
+ Self: Sized + PartialOrd<Self>,Restrict a value to a certain interval. Read moresource§impl<const S: MemoryState, P: PageSize> PartialEq<Frames<S, P>> for Frames<S, P>
source§impl<const S: MemoryState, P: PageSize> PartialOrd<Frames<S, P>> for Frames<S, P>
source§impl<const S: MemoryState, P: PageSize> PartialOrd<Frames<S, P>> for Frames<S, P>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read moresource§impl<const S: MemoryState, P: Eq + PageSize> Eq for Frames<S, P>
source§impl<const S: MemoryState, P: PageSize> StructuralEq for Frames<S, P>
\ No newline at end of file
+operator. Read moresource§impl<const S: MemoryState, P: Eq + PageSize> Eq for Frames<S, P>
source§impl<const S: MemoryState, P: PageSize> StructuralEq for Frames<S, P>
\ No newline at end of file
diff --git a/doc/mod_mgmt/type.TlsDataImage.html b/doc/mod_mgmt/type.TlsDataImage.html
index 975e53677e..eff48b0617 100644
--- a/doc/mod_mgmt/type.TlsDataImage.html
+++ b/doc/mod_mgmt/type.TlsDataImage.html
@@ -1 +1 @@
-TlsDataImage in mod_mgmt - Rust Type Alias mod_mgmt::TlsDataImage
source · pub type TlsDataImage = LocalStorageDataImage<Tls>;
Aliased Type§
struct TlsDataImage { /* private fields */ }
\ No newline at end of file
+TlsDataImage in mod_mgmt - Rust Type Alias mod_mgmt::TlsDataImage
pub type TlsDataImage = LocalStorageDataImage<Tls>;
Aliased Type§
struct TlsDataImage { /* private fields */ }
\ No newline at end of file
diff --git a/doc/mod_mgmt/type.TlsInitializer.html b/doc/mod_mgmt/type.TlsInitializer.html
index abd3495375..6b118ae35b 100644
--- a/doc/mod_mgmt/type.TlsInitializer.html
+++ b/doc/mod_mgmt/type.TlsInitializer.html
@@ -1 +1 @@
-TlsInitializer in mod_mgmt - Rust Type Alias mod_mgmt::TlsInitializer
source · pub type TlsInitializer = LocalStorageInitializer<Tls>;
Aliased Type§
struct TlsInitializer { /* private fields */ }
\ No newline at end of file
+TlsInitializer in mod_mgmt - Rust Type Alias mod_mgmt::TlsInitializer
pub type TlsInitializer = LocalStorageInitializer<Tls>;
Aliased Type§
struct TlsInitializer { /* private fields */ }
\ No newline at end of file
diff --git a/doc/src/frame_allocator/lib.rs.html b/doc/src/frame_allocator/lib.rs.html
index 6d7b02b564..06bdf6b220 100644
--- a/doc/src/frame_allocator/lib.rs.html
+++ b/doc/src/frame_allocator/lib.rs.html
@@ -1386,6 +1386,10 @@
1386
1387
1388
+1389
+1390
+1391
+1392
//! Provides an allocator for physical memory frames.
//! The minimum unit of allocation is a single frame.
//!
@@ -1584,6 +1588,7 @@
where P: Borrow<PhysicalMemoryRegion>,
R: IntoIterator<Item = P> + Clone,
{
+ let mut area = area.clone();
// This will be set to the frame that is the start of the current free region.
let mut current_start = *area.start();
// This will be set to the frame that is the end of the current free region.
@@ -1617,12 +1622,15 @@
free_list_idx,
reserved_physical_memory_areas.clone(),
);
- }
+ area = FrameRange::new(*area.start(), current_end);
+ // info!("Updating original region after exiting recursive function: {:X?}", area);
+ }
}
}
let new_area = FrameRange::new(current_start, current_end);
- if new_area.size_in_frames() > 0 {
+ // info!("Adding new area: {:X?}", new_area);
+ if new_area.size_in_frames() > 0 {
free_list[*free_list_idx] = Some(PhysicalMemoryRegion {
typ: MemoryRegionType::Free,
frames: new_area,