|
lwIP
2.1.2
Lightweight IP stack
|
#include "lwip/opt.h"#include "lwip/priv/memp_std.h"#include "lwip/priv/memp_priv.h"#include "lwip/stats.h"Macros | |
| #define | LWIP_MEMPOOL_PROTOTYPE(name) extern const struct memp_desc memp_ ## name |
| #define | LWIP_MEMPOOL_DECLARE(name, num, size, desc) |
| #define | LWIP_MEMPOOL_INIT(name) memp_init_pool(&memp_ ## name) |
| #define | LWIP_MEMPOOL_ALLOC(name) memp_malloc_pool(&memp_ ## name) |
| #define | LWIP_MEMPOOL_FREE(name, x) memp_free_pool(&memp_ ## name, (x)) |
Enumerations | |
| enum | memp_t |
Functions | |
| void | memp_init (void) |
| void * | memp_malloc (memp_t type) |
| void | memp_free (memp_t type, void *mem) |
Memory pool API
lwIP internal memory pools (do not use in application code) This file is deliberately included multiple times: once with empty definition of LWIP_MEMPOOL() to handle all includes and multiple times to build up various lists of mem pools.
| enum memp_t |
Create the list of all memory pools managed by memp. MEMP_MAX represents a NULL pool at the end
| void memp_free | ( | memp_t | type, |
| void * | mem | ||
| ) |
Put an element back into its pool.
| type | the pool where to put mem |
| mem | the memp element to free |
| void memp_init | ( | void | ) |
Initializes lwIP built-in pools. Related functions: memp_malloc, memp_free
Carves out memp_memory into linked lists for each pool-type.
| void* memp_malloc | ( | memp_t | type | ) |
Get an element from a specific pool.
| type | the pool to get an element from |