Struct xalloc::bitmap::BitmapAlloc [] [src]

pub struct BitmapAlloc { /* fields omitted */ }

Free space bitmap-based external memory allocator.

See the module-level documentation for more.

Methods

impl BitmapAlloc
[src]

[src]

Construct a BitmapAlloc.

[src]

Alias of alloc_next.

[src]

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.

[src]

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.

[src]

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

impl Debug for BitmapAlloc
[src]

[src]

Formats the value using the given formatter.

impl Clone for BitmapAlloc
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more