12 #ifndef LWIP_MALLOC_MEMPOOL
15 #define LWIP_MALLOC_MEMPOOL(num, size) LWIP_MEMPOOL(POOL_##size, num, (size + sizeof(struct memp_malloc_helper)), "MALLOC_"#size, attr)
16 #define LWIP_MALLOC_MEMPOOL_START
17 #define LWIP_MALLOC_MEMPOOL_END
20 #ifndef LWIP_PBUF_MEMPOOL
23 #define LWIP_PBUF_MEMPOOL(name, num, payload, desc, attr) LWIP_MEMPOOL(name, num, (MEMP_ALIGN_SIZE(sizeof(struct pbuf)) + MEMP_ALIGN_SIZE(payload)), desc, attr)
34 LWIP_MEMPOOL(RAW_PCB, MEMP_NUM_RAW_PCB,
sizeof(
struct raw_pcb),
"RAW_PCB", DMEM_ATTR)
38 LWIP_MEMPOOL(UDP_PCB, MEMP_NUM_UDP_PCB,
sizeof(
struct udp_pcb),
"UDP_PCB", DMEM_ATTR)
42 LWIP_MEMPOOL(TCP_PCB, MEMP_NUM_TCP_PCB,
sizeof(
struct tcp_pcb),
"TCP_PCB", DMEM_ATTR)
43 LWIP_MEMPOOL(TCP_PCB_LISTEN, MEMP_NUM_TCP_PCB_LISTEN, sizeof(struct tcp_pcb_listen), "TCP_PCB_LISTEN", DMEM_ATTR)
44 LWIP_MEMPOOL(TCP_SEG, MEMP_NUM_TCP_SEG, sizeof(struct tcp_seg), "TCP_SEG", DMEM_ATTR)
48 LWIP_MEMPOOL(REASSDATA, MEMP_NUM_REASSDATA,
sizeof(
struct ip_reassdata),
"REASSDATA", DMEM_ATTR)
50 #if IP_FRAG && !IP_FRAG_USES_STATIC_BUF && !LWIP_NETIF_TX_SINGLE_PBUF
51 LWIP_MEMPOOL(FRAG_PBUF, MEMP_NUM_FRAG_PBUF,
sizeof(
struct pbuf_custom_ref),
"FRAG_PBUF", DMEM_ATTR)
55 LWIP_MEMPOOL(NETBUF, MEMP_NUM_NETBUF,
sizeof(
struct netbuf),
"NETBUF")
56 LWIP_MEMPOOL(NETCONN, MEMP_NUM_NETCONN, sizeof(struct netconn), "NETCONN")
60 LWIP_MEMPOOL(TCPIP_MSG_API, MEMP_NUM_TCPIP_MSG_API,
sizeof(
struct tcpip_msg),
"TCPIP_MSG_API")
61 #if !LWIP_TCPIP_CORE_LOCKING_INPUT
62 LWIP_MEMPOOL(TCPIP_MSG_INPKT,MEMP_NUM_TCPIP_MSG_INPKT,
sizeof(
struct tcpip_msg),
"TCPIP_MSG_INPKT")
67 LWIP_MEMPOOL(ARP_QUEUE, MEMP_NUM_ARP_QUEUE,
sizeof(
struct etharp_q_entry),
"ARP_QUEUE", DMEM_ATTR)
71 LWIP_MEMPOOL(IGMP_GROUP, MEMP_NUM_IGMP_GROUP,
sizeof(
struct igmp_group),
"IGMP_GROUP", DMEM_ATTR)
74 #if (!NO_SYS || (NO_SYS && !NO_SYS_NO_TIMERS))
75 LWIP_MEMPOOL(SYS_TIMEOUT, MEMP_NUM_SYS_TIMEOUT,
sizeof(
struct sys_timeo),
"SYS_TIMEOUT", DMEM_ATTR)
79 LWIP_MEMPOOL(SNMP_ROOTNODE, MEMP_NUM_SNMP_ROOTNODE,
sizeof(
struct mib_list_rootnode),
"SNMP_ROOTNODE")
80 LWIP_MEMPOOL(SNMP_NODE, MEMP_NUM_SNMP_NODE, sizeof(struct mib_list_node), "SNMP_NODE")
81 LWIP_MEMPOOL(SNMP_VARBIND, MEMP_NUM_SNMP_VARBIND, sizeof(struct snmp_varbind), "SNMP_VARBIND")
82 LWIP_MEMPOOL(SNMP_VALUE, MEMP_NUM_SNMP_VALUE, SNMP_MAX_VALUE_SIZE, "SNMP_VALUE")
84 #if LWIP_DNS && LWIP_SOCKET
85 LWIP_MEMPOOL(NETDB, MEMP_NUM_NETDB, NETDB_ELEM_SIZE,
"NETDB")
87 #if LWIP_DNS && DNS_LOCAL_HOSTLIST && DNS_LOCAL_HOSTLIST_IS_DYNAMIC
88 LWIP_MEMPOOL(LOCALHOSTLIST, MEMP_NUM_LOCALHOSTLIST, LOCALHOSTLIST_ELEM_SIZE,
"LOCALHOSTLIST")
90 #if PPP_SUPPORT && PPPOE_SUPPORT
91 LWIP_MEMPOOL(PPPOE_IF, MEMP_NUM_PPPOE_INTERFACES,
sizeof(
struct pppoe_softc),
"PPPOE_IF")
102 LWIP_PBUF_MEMPOOL(PBUF, MEMP_NUM_PBUF, 0,
"PBUF_REF/ROM", DMEM_ATTR)
105 #define LWIP_MEM_ALIGN4_SIZE(size) (((size) + 4 - 1) & ~(4-1))
107 LWIP_PBUF_MEMPOOL(PBUF_POOL, PBUF_POOL_SIZE, LWIP_MEM_ALIGN4_SIZE(PBUF_POOL_BUFSIZE),
"PBUF_POOL", DMEM_ATTR)
114 #if MEMP_USE_CUSTOM_POOLS
115 #include "lwippools.h"
123 #undef LWIP_MALLOC_MEMPOOL
124 #undef LWIP_MALLOC_MEMPOOL_START
125 #undef LWIP_MALLOC_MEMPOOL_END
126 #undef LWIP_PBUF_MEMPOOL