Skip to content

Commit bb029cc

Browse files
Increase LWIP MEM_SIZE to > TCP_SND_BUF (#731)
The send buffers are set to 8 * MSS = ~11.5K. MEM_SIZE is now set to be larger than that, 16K, in order to help avoid having tcp_write fail with ENOMEM. The attempt to use a smaller size is still included, which will allow a tcp_write of up to 16 * 16K = 256K, i.e. all of memory. Fixes #725
1 parent 8fd56ad commit bb029cc

File tree

4 files changed

+2
-2
lines changed

4 files changed

+2
-2
lines changed

include/lwipopts.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ extern void interrupts();
2121
#define MEM_LIBC_MALLOC 0
2222

2323
#define MEM_ALIGNMENT 4
24-
#define MEM_SIZE 8192
24+
#define MEM_SIZE 16384
2525
#define MEMP_NUM_TCP_SEG 32
2626
#define MEMP_NUM_ARP_QUEUE 10
2727
#define PBUF_POOL_SIZE 24

lib/libpico-ipv6.a

0 Bytes
Binary file not shown.

lib/libpico.a

0 Bytes
Binary file not shown.

tools/libpico/lwipopts.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ extern void interrupts();
2121
#define MEM_LIBC_MALLOC 0
2222

2323
#define MEM_ALIGNMENT 4
24-
#define MEM_SIZE 8192
24+
#define MEM_SIZE 16384
2525
#define MEMP_NUM_TCP_SEG 32
2626
#define MEMP_NUM_ARP_QUEUE 10
2727
#define PBUF_POOL_SIZE 24

0 commit comments

Comments
 (0)