|
From: | Noam Weissman |
Subject: | Re: [lwip-users] netconn http server memory problem ? |
Date: | Wed, 25 May 2016 17:34:20 +0000 |
Hi,
I started my experience with LwIP 1.32 running on an ARM9 with 96Kbyte RAM. For LwIP we had 7K if I remember correctly. This was running a WEB server, 3 TCP <> RS232 bridges, TCP terminal server, UDP terminal server... all that with 7-8 Kbyte and RAW API.
And all that while using FreeRTOS heap1 that does not free memory... fixed.
You either have a problem with your driver or some configuration problem.
Set LwIP MSS size to 536 and try to run the echo server example. If you get into problems then it is not LwIP.
BR, Noam. From: lwip-users <lwip-users-bounces+address@hidden> on behalf of Erkan Ersoy <address@hidden>
Sent: Wednesday, May 25, 2016 6:42 PM To: Mailing list for lwIP users Subject: Re: [lwip-users] netconn http server memory problem ? Thanks for the reply
I traced problem back to where it happens so it happens in pvPortMalloc function so I put some printf 's to detect memory condition.
pxBlock value is pxBlock->xBlockSize value
freememory is xFreeBytesRemaining value
So as I see While tcp starts to run it uses lots of memory space
( I have 32 * 1024 freeRTOS heap size) Still searching for the problem any idea will be appreicated
Thank you
Below my trace output :
Code Start-----------------------------------------------------
compile DATE: May 25 2016 wanted size: 76 free memory : 32760 pxblock: 32760 domates wanted size: 97 free memory : 32672 pxblock: 32672 domates wanted size: 12000 free memory : 32560 pxblock: 32560 domates wanted size: 84 free memory : 20552 pxblock: 20552 domates wanted size: 512 free memory : 20456 pxblock: 20456 domates wanted size: 84 free memory : 19936 pxblock: 19936 domates wanted size: 2000 free memory : 19840 pxblock: 19840 domates wanted size: 84 free memory : 17832 pxblock: 17832 domates wanted size: 512 free memory : 17736 pxblock: 17736 domates wanted size: 84 free memory : 17216 pxblock: 17216 domates wanted size: 76 free memory : 17120 pxblock: 17120 domates wanted size: 8077 free memory : 17032 pxblock: 17032 domates netif_set_ipaddr: netif address being changed netif: IP address of interface set to 192.168.1.165 netif: netmask of interface set to 255.255.255.0 netif: GW address of interface set to 192.168.1.1 wanted size: 76 free memory : 8944 pxblock: 8944 domates wanted size: 1400 free memory : 8856 pxblock: 8856 domates wanted size: 84 free memory : 7448 pxblock: 7448 domates netif: added interface st IP addr 192.168.1.165 netmask 255.255.255.0 gw 192.168.1.1 netif: setting default interface st netif set up wanted size: 76 free memory : 7352 pxblock: 7352 domates tcp_bind: bind to port 4444 echo thread started1 icmp_time_exceeded from 192.168.1.1 to 192.168.1.165 wanted size: 8077 free memory : 15352 pxblock: 7264 domates echo thread started icmp_time_exceeded from 192.168.1.1 to 192.168.1.165 icmp_time_exceeded from 192.168.1.1 to 192.168.1.165 From: Sergio R. Caprile <address@hidden> To: address@hidden Sent: Monday, May 23, 2016 11:09 PM Subject: Re: [lwip-users] netconn http server memory problem ? Hope you took into account the differences amongst F107 and F207. That is your business. /* MEMP_NUM_TCP_PCB: the number of simulatenously active TCP connections. */ #define MEMP_NUM_TCP_PCB 2 That looks a bit too few... There are too many trial and error comments and the word 'example' is everywhere... you should search this list for memory configuration. You can get some memory right now if you reduce your TCP_MSS, there is no need to have it that big unless you known what you are doing. Then you have to actually check WHY you are getting that memory error. There are some other memory options in opt.h, your vendor did not put them in lwipopts.h so they might be the defaults, but... I can't help you further. I think there is a memory leak in that set of examples bunched together. Check you only call lwIP low level functions (those that are not netconn or socket) from one and only one thread. _______________________________________________ lwip-users mailing list address@hidden https://lists.nongnu.org/mailman/listinfo/lwip-users |
[Prev in Thread] | Current Thread | [Next in Thread] |