lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-users] pbuf / memory leak on ADI blackfin implementation


From: Larry Rachman
Subject: [lwip-users] pbuf / memory leak on ADI blackfin implementation
Date: Wed, 12 Jul 2006 11:45:11 -0400

We are in the process of implementing LWIP on Blackfin-based proprietary hardware, starting with the package that Analog Devices offers as part of their development environment. Our primary change to their base release was a shift to a different MAC/PHY combination, which appears to be working well.

 

We are running a simple test consisting of opening a TCP/IP connection from a PC to LWIP, sending a short (16 char) message which is echoed using the raw api, waiting for a reply at the PC end, and repeating the exchange. After about 330 (+/-) transactions, the system stalls. (BTW, we *are* calling tcp_recved() after receiving each packet.)

 

After probing at the stuck code, we see that the incoming packet is received and passed through the receive queue, but is then discarded when process_received_packets() calls pbuf_alloc(), which calls mem_malloc() which returns NULL  (no memory available).

 

Apparently there is some sort of memory leak. As an experiment, we increased MEM_SIZE by a factor of 2 and the system then stalled after approximately 2x the original message count.

 

After some exploration of the mailing list archives, we tried changing PBUF_LINK_HLEN from 14 to 16. No change was seem

 

One recurring theme in the archives was to replace mem_malloc() with malloc(), assuming that it’s available in your environment (it is in ours). But if I do that, I’m worried about disguising the problem rather than solving it; as our system has lots of RAM – I’d just be pushing the failure point out further in time.

 

Can anyone offer any suggestions as to how we might chase this, i.e. places to look, things to try, etc.

 

Thanks in advance,

 

Larry Rachman

NAII

 

 

This message and any attachments are intended only for the use of the addressee and may contain information that is privileged and confidential. If the reader of the message is not the intended recipient or an authorized representative of the intended recipient, you are hereby notified that any dissemination of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by e-mail and delete the message and any attachments from your system.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]