ソースの整理中ですが、利用はできます。 大きなファイルはできないかもしれません。
Dependencies: EthernetInterface HttpServer TextLCD expatlib mbed-rpc mbed-rtos mbed Socket lwip-eth lwip-sys lwip
Fork of giken9_HTMLServer_Sample by
Dynamic pool memory manager. More...
Go to the source code of this file.
Functions | |
static int | memp_sanity (void) |
Check that memp-lists don't form a circle. | |
static void | memp_overflow_check_element_overflow (struct memp *p, u16_t memp_type) |
Check if a memp element was victim of an overflow (e.g. | |
static void | memp_overflow_check_element_underflow (struct memp *p, u16_t memp_type) |
Check if a memp element was victim of an underflow (e.g. | |
static void | memp_overflow_check_all (void) |
Do an overflow check for all elements in every pool. | |
static void | memp_overflow_init (void) |
Initialize the restricted areas of all memp elements in every pool. | |
void | memp_init (void) |
Initialize this module. | |
void * | memp_malloc (memp_t type) memp_malloc_fn(memp_t type |
Get an element from a specific pool. | |
Variables | |
static struct memp * | memp_tab [MEMP_MAX] |
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. | |
static const char * | memp_desc [MEMP_MAX] |
This array holds a textual description of each pool. | |
static u8_t *const | memp_bases [] |
This array holds the base of each memory pool. | |
static u8_t memp_memory[MEM_ALIGNMENT-1#define LWIP_MEMPOOL(name, num, size, desc)+((num)*(MEMP_SIZE+MEMP_ALIGN_SIZE(size)))#include"lwip/memp_std.h"] | ETHMEM_SECTION |
This is the actual memory used by the pools (all pools in one big block). |
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_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
static void memp_overflow_check_all | ( | void | ) | [static] |
static void memp_overflow_check_element_overflow | ( | struct memp * | p, |
u16_t | memp_type | ||
) | [static] |
static void memp_overflow_check_element_underflow | ( | struct memp * | p, |
u16_t | memp_type | ||
) | [static] |
static void memp_overflow_init | ( | void | ) | [static] |
static int memp_sanity | ( | void | ) | [static] |
Variable Documentation
u8_t memp_memory [MEM_ALIGNMENT - 1 #define LWIP_MEMPOOL(name,num,size,desc) + ( (num) * (MEMP_SIZE + MEMP_ALIGN_SIZE(size) ) )#include "lwip/memp_std.h"] ETHMEM_SECTION [static] |
u8_t* const memp_bases[] [static] |
const char* memp_desc[MEMP_MAX] [static] |
const u16_t memp_num[MEMP_MAX] [static] |
const u16_t memp_sizes[MEMP_MAX] [static] |
Generated on Tue Jul 12 2022 23:04:34 by 1.7.2