[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-users] Sizes of lwip structures?
From: |
Peter |
Subject: |
[lwip-users] Sizes of lwip structures? |
Date: |
Thu, 14 Jul 2022 16:37:45 +0100 |
Hi All,
Could someone tell me roughly how large these structures are?
I have tried to vary each one by some large amount and then see how
much RAM (prefilled with 0x00) gets overwritten after the system has
been running for some time, but this is very hit and miss.
This Q is in relation to how to establish MEM_SIZE. I can see that if
MEMP_MEM_MALLOC=0 then it needs to be PBUF_POOL_SIZE*PBUF_POOL_BUFSIZE
(currently 8x512=4k) plus all the MEMP_ structures. Currently I have
MEM_SIZE=6k, and by reducing that gradually I have sort of established
that less than 4*PBUF_POOL_BUFSIZE starts to break various things.
/* MEMP_NUM_PBUF: the number of memp struct pbufs. If the application
sends a lot of data out of ROM (or other static memory), this
should be set high. */
#define MEMP_NUM_PBUF 5 //10
/* MEMP_NUM_UDP_PCB: the number of UDP protocol control blocks. One
per active UDP "connection". */
#define MEMP_NUM_UDP_PCB 6
/* MEMP_NUM_TCP_PCB: the number of simulatenously active TCP
connections. */
#define MEMP_NUM_TCP_PCB 5 //10
/* MEMP_NUM_TCP_PCB_LISTEN: the number of listening TCP
connections. */
#define MEMP_NUM_TCP_PCB_LISTEN 5
/* MEMP_NUM_TCP_SEG: the number of simultaneously queued TCP
segments. */
#define MEMP_NUM_TCP_SEG 8
/* MEMP_NUM_SYS_TIMEOUT: the number of simulateously active
timeouts. */
#define MEMP_NUM_SYS_TIMEOUT 10
Needless to say I have googled everywhere :)
Thank you in advance,
Peter
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [lwip-users] Sizes of lwip structures?,
Peter <=