utils
utilities in C for microcontrollers
|
A generic memory pool allocator. More...
Go to the source code of this file.
Data Structures | |
union | pool_NAME_private |
private instance type generated by POOL with name set to NAME, type set to TYPE, and size set to SIZE More... | |
struct | pool_NAME |
instance type generated by POOL with name set to NAME, type set to TYPE, and size set to SIZE More... | |
Macros | |
#define | POOL(name, type, size) |
Generates the pool api. More... | |
Functions | |
static int | pool_NAME_init (struct pool_NAME *self) |
init function generated by POOL with name set to NAME, type set to TYPE, and size set to SIZE More... | |
static TYPE * | pool_NAME_alloc (struct pool_NAME *self) |
alloc function generated by POOL with name set to NAME, type set to TYPE, and size set to SIZE More... | |
static void | pool_NAME_free (struct pool_NAME *self, TYPE *obj) |
free function generated by POOL with name set to NAME, type set to TYPE, and size set to SIZE More... | |
A generic memory pool allocator.
#define POOL | ( | name, | |
type, | |||
size | |||
) |
Generates the pool api.
name | a name for the api with the given type and size |
type | the type of objects to allocate |
size | the maximum number of objects that can be allocated |
|
inlinestatic |
|
inlinestatic |