00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #ifndef LWIP_MALLOC_MEMPOOL
00013
00014
00015 #define LWIP_MALLOC_MEMPOOL(num, size) LWIP_MEMPOOL(POOL_##size, num, (size + sizeof(struct memp_malloc_helper)), "MALLOC_"#size)
00016 #define LWIP_MALLOC_MEMPOOL_START
00017 #define LWIP_MALLOC_MEMPOOL_END
00018 #endif
00019
00020 #ifndef LWIP_PBUF_MEMPOOL
00021
00022
00023 #define LWIP_PBUF_MEMPOOL(name, num, payload, desc) LWIP_MEMPOOL(name, num, (MEMP_ALIGN_SIZE(sizeof(struct pbuf)) + MEMP_ALIGN_SIZE(payload)), desc)
00024 #endif
00025
00026
00027
00028
00029
00030
00031
00032
00033 #if LWIP_RAW
00034 LWIP_MEMPOOL(RAW_PCB, MEMP_NUM_RAW_PCB, sizeof(struct raw_pcb), "RAW_PCB")
00035 #endif
00036
00037 #if LWIP_UDP
00038 LWIP_MEMPOOL(UDP_PCB, MEMP_NUM_UDP_PCB, sizeof(struct udp_pcb), "UDP_PCB")
00039 #endif
00040
00041 #if LWIP_TCP
00042 LWIP_MEMPOOL(TCP_PCB, MEMP_NUM_TCP_PCB, sizeof(struct tcp_pcb), "TCP_PCB")
00043 LWIP_MEMPOOL(TCP_PCB_LISTEN, MEMP_NUM_TCP_PCB_LISTEN, sizeof(struct tcp_pcb_listen), "TCP_PCB_LISTEN")
00044 LWIP_MEMPOOL(TCP_SEG, MEMP_NUM_TCP_SEG, sizeof(struct tcp_seg), "TCP_SEG")
00045 #endif
00046
00047 #if IP_REASSEMBLY
00048 LWIP_MEMPOOL(REASSDATA, MEMP_NUM_REASSDATA, sizeof(struct ip_reassdata), "REASSDATA")
00049 #endif
00050
00051 #if LWIP_NETCONN
00052 LWIP_MEMPOOL(NETBUF, MEMP_NUM_NETBUF, sizeof(struct netbuf), "NETBUF")
00053 LWIP_MEMPOOL(NETCONN, MEMP_NUM_NETCONN, sizeof(struct netconn), "NETCONN")
00054 #endif
00055
00056 #if NO_SYS==0
00057 LWIP_MEMPOOL(TCPIP_MSG_API, MEMP_NUM_TCPIP_MSG_API, sizeof(struct tcpip_msg), "TCPIP_MSG_API")
00058 LWIP_MEMPOOL(TCPIP_MSG_INPKT,MEMP_NUM_TCPIP_MSG_INPKT, sizeof(struct tcpip_msg), "TCPIP_MSG_INPKT")
00059 #endif
00060
00061 #if ARP_QUEUEING
00062 LWIP_MEMPOOL(ARP_QUEUE, MEMP_NUM_ARP_QUEUE, sizeof(struct etharp_q_entry), "ARP_QUEUE")
00063 #endif
00064
00065 #if LWIP_IGMP
00066 LWIP_MEMPOOL(IGMP_GROUP, MEMP_NUM_IGMP_GROUP, sizeof(struct igmp_group), "IGMP_GROUP")
00067 #endif
00068
00069 #if NO_SYS==0
00070 LWIP_MEMPOOL(SYS_TIMEOUT, MEMP_NUM_SYS_TIMEOUT, sizeof(struct sys_timeo), "SYS_TIMEOUT")
00071 #endif
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082 LWIP_PBUF_MEMPOOL(PBUF, MEMP_NUM_PBUF, 0, "PBUF_REF/ROM")
00083 LWIP_PBUF_MEMPOOL(PBUF_POOL, PBUF_POOL_SIZE, PBUF_POOL_BUFSIZE, "PBUF_POOL")
00084
00085
00086
00087
00088
00089
00090 #if MEMP_USE_CUSTOM_POOLS
00091 #include "lwippools.h"
00092 #endif
00093
00094
00095
00096
00097
00098 #undef LWIP_MEMPOOL
00099 #undef LWIP_MALLOC_MEMPOOL
00100 #undef LWIP_MALLOC_MEMPOOL_START
00101 #undef LWIP_MALLOC_MEMPOOL_END
00102 #undef LWIP_PBUF_MEMPOOL