Go to the source code of this file.
|
#define | LWIP_MEMPOOL(name, num, size, desc) |
|
#define | LWIP_MEMPOOL(name, num, size, desc) MEMP_##name, |
|
#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)) |
|
◆ LWIP_MEMPOOL [1/2]
#define LWIP_MEMPOOL |
( |
|
name, |
|
|
|
num, |
|
|
|
size, |
|
|
|
desc |
|
) |
| |
◆ LWIP_MEMPOOL [2/2]
#define LWIP_MEMPOOL |
( |
|
name, |
|
|
|
num, |
|
|
|
size, |
|
|
|
desc |
|
) |
| MEMP_##name, |
◆ memp_t
Create the list of all memory pools managed by memp. MEMP_MAX represents a NULL pool at the end
53 #define LWIP_MEMPOOL(name,num,size,desc) MEMP_##name,
◆ memp_init()
Initializes lwIP built-in pools. Related functions: memp_malloc, memp_free
Carves out memp_memory into linked lists for each pool-type.
279 #if LWIP_STATS && MEMP_STATS
284 #if MEMP_OVERFLOW_CHECK >= 2
286 memp_overflow_check_all();
◆ memp_malloc()
Get an element from a specific pool.
- Parameters
-
type | the pool to get an element from |
- Returns
- a pointer to the allocated memory or a NULL pointer on error
393 #if MEMP_OVERFLOW_CHECK >= 2
394 memp_overflow_check_all();
397 #if !MEMP_OVERFLOW_CHECK
◆ memp_free()
Put an element back into its pool.
- Parameters
-
type | the pool where to put mem |
mem | the memp element to free |
471 #ifdef LWIP_HOOK_MEMP_AVAILABLE
472 struct memp *old_first;
481 #if MEMP_OVERFLOW_CHECK >= 2
482 memp_overflow_check_all();
485 #ifdef LWIP_HOOK_MEMP_AVAILABLE
491 #ifdef LWIP_HOOK_MEMP_AVAILABLE
492 if (old_first ==
NULL) {
493 LWIP_HOOK_MEMP_AVAILABLE(
type);
◆ memp_pools