|
| template<typename T> |
| static constexpr size_t | StkGetWordCountForType () |
| void * | malloc (size_t size) |
| void | free (void *ptr) |
| static BlockPoolSlot * | FindSlot (const stk_blockpool_t *pool) |
| static BlockPoolSlot * | AcquireSlot () |
| stk_blockpool_t * | stk_blockpool_create (size_t capacity, size_t raw_block_size, const char *name) |
| | Create a block pool backed by heap-allocated storage.
|
| stk_blockpool_t * | stk_blockpool_create_static (size_t capacity, size_t raw_block_size, uint8_t *storage_ptr, size_t storage_size, const char *name) |
| | Create a block pool backed by caller-supplied (external) storage.
|
| void | stk_blockpool_destroy (stk_blockpool_t *pool) |
| | Destroy a pool and return its slot to the static pool.
|
| void * | stk_blockpool_alloc (stk_blockpool_t *pool) |
| | Allocate one block, blocking indefinitely until one is available.
|
| void * | stk_blockpool_timed_alloc (stk_blockpool_t *pool, stk_timeout_t timeout) |
| | Allocate one block, blocking until one becomes available or the timeout expires.
|
| void * | stk_blockpool_try_alloc (stk_blockpool_t *pool) |
| | Non-blocking allocation attempt.
|
| bool | stk_blockpool_free (stk_blockpool_t *pool, void *ptr) |
| | Return a previously allocated block to the pool.
|
| bool | stk_blockpool_is_storage_valid (const stk_blockpool_t *pool) |
| | Verify that the backing storage is valid and the pool is ready for use.
|
| size_t | stk_blockpool_get_capacity (const stk_blockpool_t *pool) |
| | Get the total block capacity of the pool.
|
| size_t | stk_blockpool_get_block_size (const stk_blockpool_t *pool) |
| | Get the aligned block size used internally by the allocator.
|
| size_t | stk_blockpool_get_used_count (const stk_blockpool_t *pool) |
| | Get the number of currently allocated (outstanding) blocks.
|
| size_t | stk_blockpool_get_free_count (const stk_blockpool_t *pool) |
| | Get the number of free (available) blocks.
|
| bool | stk_blockpool_is_full (const stk_blockpool_t *pool) |
| | Check whether all blocks are currently allocated (pool exhausted).
|
| bool | stk_blockpool_is_empty (const stk_blockpool_t *pool) |
| | Check whether all blocks are free (no outstanding allocations).
|