Enum redox_buffer_pool::AllocationStrategy [−][src]
pub enum AllocationStrategy<I> { Optimal, Greedy, Fixed(I), }
Expand description
The strategy to use when allocating, with tradeoffs between heap fragmentation, and the algorithmic complexity of allocating.
Variants
Allocate as optimally as possible, by taking some extra time into making sure that the smallest range with the smallest alignment possible is used. This is currently O(1) in best case, but O(n) in worst case.
Allocate as quickly as possible. This is currently implemented as a B-tree lookup in the free space map, so it’ll prioritize smaller ranges, and smaller alignments afterwards. This is O(log n) in best case, average case, and worst case.
Allocate at a fixed offset. Since this won’t cause the allocator to find a suitable range, but only check whether the range requested exists, this is also O(log n) in best case, average case, and worst case.
Trait Implementations
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl<I> RefUnwindSafe for AllocationStrategy<I> where
I: RefUnwindSafe,
impl<I> Send for AllocationStrategy<I> where
I: Send,
impl<I> Sync for AllocationStrategy<I> where
I: Sync,
impl<I> Unpin for AllocationStrategy<I> where
I: Unpin,
impl<I> UnwindSafe for AllocationStrategy<I> where
I: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more