I have posted this to the Luminarymicro.com forum as well.
LwIP Data Stream Memory Leak
I have created an application based on enet_ptpd for the LM3S8962.
My application is different in that it is not a web server but rather streams data from the embedded device to a PC. The data is streamed over TCP/IP. The network is simply the a cable between to static IP address.
I am having a memory leak problem. I identified the problem when after some time the embedded device no longer can allocate pbuf memory to send another packet to the PC. I enabled lwip_stats and can see that every thing is fine for 15 minutes or so and then suddenly the lwip_stats.mem.used starts to slowly creep up until finally after another 15 minutes or so it finally runs out of available memory.
I have only found 2 items that appear to affect the memory leak rate.
1) if the device streams at 5 packets per second the above memory leak occurs. If the same size packet is sent 50 times per second it can take over 12 hours before the leak becomes present.
2) if MEMP_SANITY_CHECK is enabled this can also improve the system for maybe around 4-5 hours before failure.
Has anyone seen a problem like this before? Any ideas where I should look?