Skip to main content

create_pool

Function create_pool 

Source
pub unsafe fn create_pool(
    allocator: &mut Allocator<'_>,
    info: &PoolCreateInfo,
) -> Result<Pool, AllocError>
Expand description

Create a fixed-memory-type TLSF pool transactionally.

A zero maximum follows VMA’s unlimited convention. Minimum blocks stay allocated until explicit pool destruction. Above the minimum, one empty block can be retained to avoid repeated native allocation/free churn. Zero block size selects VMA’s heap-based preferred size, bounded growth and pool-owned dedicated fallback. Minimum blocks use the full preferred size.

§Errors

Returns checked invalid-policy/type/state/limit errors or the original native failure. A failed minimum-block acquisition rolls back only this new pool.

§Safety

Context/physical metadata must be valid; enforce any unqueried native limits.