Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of mbed-os by
lwip_memp.c File Reference
Dynamic pool memory manager. More...
Go to the source code of this file.
Functions | |
static int | memp_sanity (const struct memp_desc *desc) |
Check that memp-lists don't form a circle, using "Floyd's cycle-finding algorithm". | |
static void | memp_overflow_check_element_overflow (struct memp *p, const struct memp_desc *desc) |
Check if a memp element was victim of an overflow (e.g. | |
static void | memp_overflow_check_element_underflow (struct memp *p, const struct memp_desc *desc) |
Check if a memp element was victim of an underflow (e.g. | |
static void | memp_overflow_init_element (struct memp *p, const struct memp_desc *desc) |
Initialize the restricted area of on memp element. | |
static void | memp_overflow_check_all (void) |
Do an overflow check for all elements in every pool. | |
static void | memp_overflow_init (const struct memp_desc *desc) |
Initialize the restricted areas of all memp elements in a pool. | |
void | memp_init_pool (const struct memp_desc *desc) |
Initialize custom memory pool. | |
void | memp_init (void) |
Initializes lwIP built-in pools. | |
void * | memp_malloc_pool (const struct memp_desc *desc) memp_malloc_pool_fn(const struct memp_desc *desc |
Get an element from a custom 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 lwip_memp.c.
Function Documentation
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.
Definition at line 280 of file lwip_memp.c.
void memp_init_pool | ( | const struct memp_desc * | desc ) |
Initialize custom memory pool.
Related functions: memp_malloc_pool, memp_free_pool
- Parameters:
-
desc pool to initialize
Definition at line 235 of file lwip_memp.c.
void* memp_malloc_pool | ( | const struct memp_desc * | desc ) | const |
Get an element from a custom pool.
- Parameters:
-
desc the pool to get an element from
- Returns:
- a pointer to the allocated memory or a NULL pointer on error
static void memp_overflow_check_all | ( | void | ) | [static] |
Do an overflow check for all elements in every pool.
- See also:
- memp_overflow_check_element for a description of the check
Definition at line 190 of file lwip_memp.c.
static void memp_overflow_check_element_overflow | ( | struct memp * | p, |
const struct memp_desc * | desc | ||
) | [static] |
Check if a memp element was victim of an overflow (e.g.
the restricted area after it has been altered)
- Parameters:
-
p the memp element to check memp_type the pool p comes from
Definition at line 126 of file lwip_memp.c.
static void memp_overflow_check_element_underflow | ( | struct memp * | p, |
const struct memp_desc * | desc | ||
) | [static] |
Check if a memp element was victim of an underflow (e.g.
the restricted area before it has been altered)
- Parameters:
-
p the memp element to check memp_type the pool p comes from
Definition at line 150 of file lwip_memp.c.
static void memp_overflow_init | ( | const struct memp_desc * | desc ) | [static] |
Initialize the restricted areas of all memp elements in a pool.
Definition at line 214 of file lwip_memp.c.
static void memp_overflow_init_element | ( | struct memp * | p, |
const struct memp_desc * | desc | ||
) | [static] |
Initialize the restricted area of on memp element.
Definition at line 170 of file lwip_memp.c.
static int memp_sanity | ( | const struct memp_desc * | desc ) | [static] |
Check that memp-lists don't form a circle, using "Floyd's cycle-finding algorithm".
Definition at line 99 of file lwip_memp.c.
Generated on Tue Jul 12 2022 13:16:22 by
