Struct resources::address_allocator::AddressAllocatorSet
source · pub struct AddressAllocatorSet<'a> {
allocators: &'a mut [AddressAllocator],
}
Expand description
Contains a set of AddressAllocator
s for allocating address ranges.
When attempting an allocation, each allocator will be tried in order until
the allocation is successful.
See AddressAllocator
for function documentation.
Fields§
§allocators: &'a mut [AddressAllocator]
Implementations§
source§impl<'a> AddressAllocatorSet<'a>
impl<'a> AddressAllocatorSet<'a>
pub fn new(allocators: &'a mut [AddressAllocator]) -> Self
pub fn allocate_with_align( &mut self, size: u64, alloc: Alloc, tag: String, alignment: u64 ) -> Result<u64>
pub fn allocate(&mut self, size: u64, alloc: Alloc, tag: String) -> Result<u64>
pub fn allocate_at( &mut self, range: AddressRange, alloc: Alloc, tag: String ) -> Result<()>
pub fn release(&mut self, alloc: Alloc) -> Result<AddressRange>
pub fn get(&self, alloc: &Alloc) -> Option<&(AddressRange, String)>
pub fn address_from_pci_offset( &self, alloc: Alloc, offset: u64, size: u64 ) -> Result<u64>
Auto Trait Implementations§
impl<'a> RefUnwindSafe for AddressAllocatorSet<'a>
impl<'a> Send for AddressAllocatorSet<'a>
impl<'a> Sync for AddressAllocatorSet<'a>
impl<'a> Unpin for AddressAllocatorSet<'a>
impl<'a> !UnwindSafe for AddressAllocatorSet<'a>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more