lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-users] memory calculation & estimations


From: Bandu
Subject: [lwip-users] memory calculation & estimations
Date: Tue, 14 Apr 2009 09:43:09 +0100

Hi,
 
How can I accurately estimates my memory sizes?
 
My firmware got 2 TCP channel data streaming using 10Mpbs Hubs. The behaviour is the transmission become very jitter and after many hours, one the TCP channel transmission was stopped. Its snd_buf was never get back to normal.
 
Can you explain me how those memory size are calculated for tx and rx buffers.
 
My lwip opts options are as below (use no RTOS):
//*****************************************************************************

//

// ---------- Memory options ----------

//

//*****************************************************************************

//#define MEM_LIBC_MALLOC 1

#define

MEM_ALIGNMENT 4 // default is 1

#define

MEM_SIZE (24 * 1024) // default is 1600

//#define MEMP_OVERFLOW_CHECK 1

//#define MEMP_SANITY_CHECK 1

//#define MEM_USE_POOLS 1

//#define MEMP_USE_CUSTOM_POOLS 0

//*****************************************************************************

//

// ---------- Internal Memory Pool Sizes ----------

//

//*****************************************************************************

#define

MEMP_NUM_PBUF 16

//#define MEMP_NUM_RAW_PCB 4

//#define MEMP_NUM_UDP_PCB 4

#define

MEMP_NUM_TCP_PCB 40 // default is 5

#define

MEMP_NUM_TCP_PCB_LISTEN 8

#define

MEMP_NUM_TCP_SEG 48 // default is 16

//#define MEMP_NUM_REASSDATA 5

#define

MEMP_NUM_ARP_QUEUE 15 // default is 30

//#define MEMP_NUM_IGMP_GROUP 8

//#define MEMP_NUM_SYS_TIMEOUT 3

#define

MEMP_NUM_NETBUF 0 // default is 2

#define

MEMP_NUM_NETCONN 0 // default is 4

#define

MEMP_NUM_TCPIP_MSG_API 0 // default is 8

#define

MEMP_NUM_TCPIP_MSG_INPKT 0 // default is 8

#define

PBUF_POOL_SIZE 32

/*****************************************************************************

//

// ---------- TCP options ----------

//

//*****************************************************************************

//#define LWIP_TCP 1

//#define TCP_TTL (IP_DEFAULT_TTL)

#define

TCP_WND (2 * 1024) // default is 2048

#define

TCP_MAXRTX 12

//#define TCP_SYNMAXRTX 6

//#define TCP_QUEUE_OOSEQ 1

#define

TCP_MSS 1024 // default is 128

//#define TCP_CALCULATE_EFF_SEND_MSS 1

#define

TCP_SND_BUF (6 * TCP_MSS)

// default is 256

#define

TCP_SND_QUEUELEN (MEMP_NUM_TCP_SEG)

//*****************************************************************************

//

// ---------- Pbuf options ----------

//

//*****************************************************************************

#define

PBUF_LINK_HLEN 16 // default is 14

#define

PBUF_POOL_BUFSIZE 256// LWIP_MEM_ALIGN_SIZE(TCP_MSS+40+PBUF_LINK_HLEN)

// default is LWIP_MEM_ALIGN_SIZE(TCP_MSS+40+PBUF_LINK_HLEN)

#define

ETH_PAD_SIZE 2 // default is 0
 
thank you very much.
 
 
--
Bandu
address@hidden

reply via email to

[Prev in Thread] Current Thread [Next in Thread]