pub struct OverflowAllocator { /* private fields */ }
Expand description
The OverflowAllocator
is used to allocate medium sized objects
(objects of at least MEDIUM_OBJECT
bytes size) within the immix space to
limit fragmentation in the NormalAllocator
.
Implementations§
Source§impl OverflowAllocator
impl OverflowAllocator
Sourcepub fn new(
block_allocator: *mut BlockAllocator,
bitmap: *const SpaceBitmap<comet::::allocator::overflow::{impl#0}::new::{constant#0}>,
) -> OverflowAllocator
pub fn new( block_allocator: *mut BlockAllocator, bitmap: *const SpaceBitmap<comet::::allocator::overflow::{impl#0}::new::{constant#0}>, ) -> OverflowAllocator
Create a new OverflowAllocator
backed by the given BlockAllocator
.
Trait Implementations§
Source§impl Allocator for OverflowAllocator
impl Allocator for OverflowAllocator
fn line_bitmap( &self, ) -> &SpaceBitmap<comet::::allocator::overflow::{impl#1}::line_bitmap::{constant#0}>
Source§fn get_all_blocks(&mut self, list: &mut BlockList)
fn get_all_blocks(&mut self, list: &mut BlockList)
Get all block managed by the allocator, draining any local
collections.
Source§fn take_current_block(&mut self) -> Option<(*mut Block, u16, u16)>
fn take_current_block(&mut self) -> Option<(*mut Block, u16, u16)>
Get the current block to allocate from.
Source§fn put_current_block(&mut self, block_tuple: (*mut Block, u16, u16))
fn put_current_block(&mut self, block_tuple: (*mut Block, u16, u16))
Set the current block to allocate from.
Source§fn get_new_block(&mut self) -> Option<(*mut Block, u16, u16)>
fn get_new_block(&mut self) -> Option<(*mut Block, u16, u16)>
Get a new block from a block resource.
Source§fn handle_no_hole(&mut self, size: usize) -> Option<(*mut Block, u16, u16)>
fn handle_no_hole(&mut self, size: usize) -> Option<(*mut Block, u16, u16)>
Callback if no hole of
size
bytes was found in the current block.Source§fn handle_full_block(&mut self, block: *mut Block)
fn handle_full_block(&mut self, block: *mut Block)
Callback if the given
block
has no holes left.Auto Trait Implementations§
impl Freeze for OverflowAllocator
impl !RefUnwindSafe for OverflowAllocator
impl !Send for OverflowAllocator
impl !Sync for OverflowAllocator
impl Unpin for OverflowAllocator
impl !UnwindSafe for OverflowAllocator
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