Struct comet::allocator::normal::NormalAllocator [−][src]
pub struct NormalAllocator { /* fields omitted */ }Expand description
The NormalAllocator is the standard allocator to allocate objects within
the immix space.
Objects smaller than MEDIUM_OBJECT bytes are
Implementations
pub fn new(
block_allocator: *mut BlockAllocator,
bitmap: *const SpaceBitmap<LINE_SIZE>
) -> NormalAllocator
pub fn new(
block_allocator: *mut BlockAllocator,
bitmap: *const SpaceBitmap<LINE_SIZE>
) -> NormalAllocator
Create a new NormalAllocator backed by the given BlockAllocator.
Set the recyclable blocks.
Trait Implementations
Get all block managed by the allocator, draining any local collections. Read more
Get the current block to allocate from.
Set the current block to allocate from.
Get a new block from a block resource.
Callback if no hole of size bytes was found in the current block.
Callback if the given block has no holes left.
Allocate an object of size bytes or return None. Read more
Scan a block tuple for a hole of size bytes and return a matching
hole. Read more
fn allocate_from_block(
&self,
size: usize,
block_tuple: BlockTuple
) -> (BlockTuple, *mut HeapObjectHeader)
fn allocate_from_block(
&self,
size: usize,
block_tuple: BlockTuple
) -> (BlockTuple, *mut HeapObjectHeader)
Allocate an uninitialized object of size bytes from the block tuple. Read more