Memory pool API. More...
#include "lwip/opt.h"
#include "lwip/priv/memp_std.h"
#include "lwip/priv/memp_priv.h"
#include "lwip/stats.h"
Go to the source code of this file.
Macros | |
#define | LWIP_MEMPOOL_PROTOTYPE(name) extern const struct memp_desc memp_ ## name |
Declare prototype for private memory pool if it is used in multiple files. More... | |
#define | LWIP_MEMPOOL_DECLARE(name, num, size, desc) |
Declare a private memory pool Private mempools example: .h: only when pool is used in multiple .c files: LWIP_MEMPOOL_PROTOTYPE(my_private_pool); .c: More... | |
#define | LWIP_MEMPOOL_INIT(name) memp_init_pool(&memp_ ## name) |
Initialize a private memory pool. More... | |
#define | LWIP_MEMPOOL_ALLOC(name) memp_malloc_pool(&memp_ ## name) |
Allocate from a private memory pool. More... | |
#define | LWIP_MEMPOOL_FREE(name, x) memp_free_pool(&memp_ ## name, (x)) |
Free element from a private memory pool. More... | |
Enumerations |
Memory pool API.
Definition in file memp.h.
#define LWIP_MEMPOOL_ALLOC | ( | name | ) | memp_malloc_pool(&memp_ ## name) |
#define LWIP_MEMPOOL_DECLARE | ( | name, | |
num, | |||
size, | |||
desc | |||
) |
Declare a private memory pool Private mempools example: .h: only when pool is used in multiple .c files: LWIP_MEMPOOL_PROTOTYPE(my_private_pool); .c:
To relocate a pool, declare it as extern in cc.h. Example for GCC: extern u8_t __attribute__((section(".onchip_mem"))) memp_memory_my_private_pool_base[];
#define LWIP_MEMPOOL_FREE | ( | name, | |
x | |||
) | memp_free_pool(&memp_ ## name, (x)) |
#define LWIP_MEMPOOL_INIT | ( | name | ) | memp_init_pool(&memp_ ## name) |
#define LWIP_MEMPOOL_PROTOTYPE | ( | name | ) | extern const struct memp_desc memp_ ## name |