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.