#include <stddef.h>
#include <stdint.h>
Go to the source code of this file.
◆ mpool_alloc()
void* mpool_alloc |
( |
struct mpool * |
mpool, |
|
|
size_t |
size |
|
) |
| |
Allocate a memory space from the memory pool.
- Parameters
-
mem_pool | Pointer to the memory poll object. |
size | The size of the memory to allocate in bytes. |
◆ mpool_init()
void mpool_init |
( |
struct mpool * |
mpool, |
|
|
uint8_t * |
mem, |
|
|
size_t |
size |
|
) |
| |
Initialize a memory poll object with a contiguous memory space.
- Parameters
-
mem_pool | Pointer to the memory poll object. |
mem | A contiguous memory space to provide. |
size | The size of the memory poll. |