Struct comet::block::Block[][src]

#[repr(C, align(16))]
pub struct Block { pub all_next: *mut Self, pub next: *mut Self, pub allocated: u32, pub hole_count: u8, pub heap: *mut Heap, }
Expand description

A block is a page-aligned container for heap-allocated objects.

Fields

all_next: *mut Selfnext: *mut Selfallocated: u32

Stores magic number to check if block is allocated.

hole_count: u8heap: *mut Heap

Implementations

Convert an address on this block into a line number.

Get pointer to block from object pointer.

Safety

Does not do anything unsafe but might return wrong pointer

Update the line counter for the given object.

Mark if MARK, otherwise clear mark bit.

Scan the block for a hole to allocate into.

The scan will start at last_high_offset bytes into the block and return a tuple of low_offset, high_offset as the lowest and highest usable offsets for a hole.

None is returned if no hole was found.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.