Struct xalloc::bitmap::BitmapAlloc

source ·
pub struct BitmapAlloc { /* private fields */ }
Expand description

Free space bitmap-based external memory allocator.

See the module-level documentation for more.

Implementations

Construct a BitmapAlloc.

Alias of alloc_next.

Allocate a region of the size size using a Next-Fit strategy. The time complexity is linear to the size of the heap.

Returns a handle of the allocated region and its offset if the allocation succeeds. Returns None otherwise.

size must not be zero.

Allocate a region of the size size using a First-Fit strategy. The time complexity is linear to the size of the heap.

Returns a handle of the allocated region and its offset if the allocation succeeds. Returns None otherwise.

size must not be zero.

Deallocate the specified region.

r must originate from the same instance of BitmapAlloc. Otherwise, BitmapAlloc enters an inconsistent state and possibly panics, but does not cause an undefined behavior.

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more

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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
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.