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?

-- 
Regards,

Mathieu Schneider
Firmware Developer
______________________________________________________
Pacific Design Engineering,
8505 Eastlake Drive, Burnaby, BC, CANADA, V5A 4T7
Phone: 1 (604) 421-1311 Ext: 39
Toll free: 1 (800) 561-3322
Fax: 1 (604) 421-9202
______________________________________________________
_______________________________________________
lwip-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to