[−][src]Struct allocator_suite::allocators::bit_set::bit_set_allocator::BitSetAllocator
Bit set based allocator.
Methods
impl<MS: MemorySource> BitSetAllocator<MS>
[src]
pub fn new_by_amount_8(
memory_source: MS,
memory_source_size: NonZeroUsize
) -> Result<Self, AllocErr>
[src]
memory_source: MS,
memory_source_size: NonZeroUsize
) -> Result<Self, AllocErr>
New instance wrapping a block of memory for an 8 byte block size.
pub fn new_by_amount_16(
memory_source: MS,
memory_source_size: NonZeroUsize
) -> Result<Self, AllocErr>
[src]
memory_source: MS,
memory_source_size: NonZeroUsize
) -> Result<Self, AllocErr>
New instance wrapping a block of memory for a 16 byte block size.
pub fn new_by_amount_32(
memory_source: MS,
memory_source_size: NonZeroUsize
) -> Result<Self, AllocErr>
[src]
memory_source: MS,
memory_source_size: NonZeroUsize
) -> Result<Self, AllocErr>
New instance wrapping a block of memory for a 32 byte block size.
pub fn new_by_amount(
memory_source: MS,
block_size: NonZeroUsize,
memory_source_size: NonZeroUsize
) -> Result<Self, AllocErr>
[src]
memory_source: MS,
block_size: NonZeroUsize,
memory_source_size: NonZeroUsize
) -> Result<Self, AllocErr>
Create a new instance by memory size and block size.
pub fn new(
memory_source: MS,
block_size: NonZeroUsize,
number_of_blocks: NonZeroUsize
) -> Result<Self, AllocErr>
[src]
memory_source: MS,
block_size: NonZeroUsize,
number_of_blocks: NonZeroUsize
) -> Result<Self, AllocErr>
Create a new instance.
Trait Implementations
impl<MS: MemorySource> LocalAllocator for BitSetAllocator<MS>
[src]
fn memory_range(&self) -> MemoryRange
[src]
fn contains(&self, from_memory_address: MemoryAddress) -> bool
[src]
impl<MS: MemorySource> Allocator for BitSetAllocator<MS>
[src]
fn allocate(
&self,
non_zero_size: NonZeroUsize,
non_zero_power_of_two_alignment: NonZeroUsize
) -> Result<MemoryAddress, AllocErr>
[src]
&self,
non_zero_size: NonZeroUsize,
non_zero_power_of_two_alignment: NonZeroUsize
) -> Result<MemoryAddress, AllocErr>
fn deallocate(
&self,
non_zero_size: NonZeroUsize,
_non_zero_power_of_two_alignment: NonZeroUsize,
current_memory: MemoryAddress
)
[src]
&self,
non_zero_size: NonZeroUsize,
_non_zero_power_of_two_alignment: NonZeroUsize,
current_memory: MemoryAddress
)
fn growing_reallocate(
&self,
non_zero_new_size: NonZeroUsize,
non_zero_power_of_two_alignment: NonZeroUsize,
non_zero_current_size: NonZeroUsize,
current_memory: MemoryAddress
) -> Result<MemoryAddress, AllocErr>
[src]
&self,
non_zero_new_size: NonZeroUsize,
non_zero_power_of_two_alignment: NonZeroUsize,
non_zero_current_size: NonZeroUsize,
current_memory: MemoryAddress
) -> Result<MemoryAddress, AllocErr>
fn shrinking_reallocate(
&self,
non_zero_new_size: NonZeroUsize,
non_zero_power_of_two_alignment: NonZeroUsize,
non_zero_current_size: NonZeroUsize,
current_memory: MemoryAddress
) -> Result<MemoryAddress, AllocErr>
[src]
&self,
non_zero_new_size: NonZeroUsize,
non_zero_power_of_two_alignment: NonZeroUsize,
non_zero_current_size: NonZeroUsize,
current_memory: MemoryAddress
) -> Result<MemoryAddress, AllocErr>
const ZERO_SIZED_ALLOCATION: MemoryAddress
[src]
fn adapt<'a>(&'a self) -> AllocatorAdaptor<'a, Self>
[src]
fn adapt_reference<'a>(&'a self) -> &'a AllocatorAdaptor<'a, Self>
[src]
impl<MS: MemorySource> Drop for BitSetAllocator<MS>
[src]
impl<MS: Debug + MemorySource> Debug for BitSetAllocator<MS>
[src]
Auto Trait Implementations
impl<MS> !Send for BitSetAllocator<MS>
impl<MS> !Sync for BitSetAllocator<MS>
impl<MS> Unpin for BitSetAllocator<MS> where
MS: Unpin,
MS: Unpin,
impl<MS> UnwindSafe for BitSetAllocator<MS> where
MS: UnwindSafe,
MS: UnwindSafe,
impl<MS> !RefUnwindSafe for BitSetAllocator<MS>
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,