Last commit 03 Apr 2012
Dynamic pool memory manager. More...
Go to the source code of this file.
Functions | |
| void | memp_init (void) |
| Initialize this module. | |
| void * | memp_malloc (memp_t type) |
| Get an element from a specific pool. | |
| void | memp_free (memp_t type, void *mem) |
| Put an element back into its pool. | |
Variables | |
| static struct memp *memp_tab[MEMP_MAX] | MEM_POSITION |
| This array holds the first free element of each pool. | |
| static const u16_t | memp_sizes [MEMP_MAX] |
| This array holds the element sizes of each pool. | |
| static const u16_t | memp_num [MEMP_MAX] |
| This array holds the number of elements in each pool. | |
Detailed Description
Dynamic pool memory manager.
lwIP has dedicated pools for many structures (netconn, protocol control blocks, packet buffers, ...). All these pools are managed here.
Definition in file memp.c.
Function Documentation
| void memp_free | ( | memp_t | type, |
| void * | mem | ||
| ) |
| void memp_init | ( | void | ) |
| void* memp_malloc | ( | memp_t | type ) |
Get an element from a specific pool.
- Parameters:
-
type the pool to get an element from
the debug version has two more parameters:
- Parameters:
-
file file name calling this function line number of line where this function is called
- Returns:
- a pointer to the allocated memory or a NULL pointer on error
Variable Documentation
u8_t memp_memory [MEM_ALIGNMENT - 1 #define LWIP_MEMPOOL(name,num,size,desc) ] MEM_POSITION [static] |
const u16_t memp_num[MEMP_MAX] [static] |
const u16_t memp_sizes[MEMP_MAX] [static] |
