PatchworkOS  19e446b
A non-POSIX operating system.
Loading...
Searching...
No Matches
pool.c File Reference
#include <kernel/mem/pool.h>
Include dependency graph for pool.c:

Go to the source code of this file.

Functions

void pool_init (pool_t *pool, void *elements, size_t capacity, size_t elementSize, size_t nextOffset)
 Initialize a pool.
 
pool_idx_t pool_alloc (pool_t *pool)
 Allocate an element from the pool.
 
void pool_free (pool_t *pool, pool_idx_t idx)
 Free an element back to the pool.