lwip-devel
[Top][All Lists]
Advanced

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

Re: [lwip-devel] Re: [lwip-users] MEMP_TCP_SEG somehow being leaked so t


From: Kieran Mansley
Subject: Re: [lwip-devel] Re: [lwip-users] MEMP_TCP_SEG somehow being leaked so that they never become available for reuse.
Date: Thu, 22 Mar 2007 15:30:39 +0000

On Thu, 2007-03-22 at 22:29 +0800, geckook Xu wrote:
> I have set TCP_PCB to 1000, TCP_SEG to 600, TCP_MSG to 8,
> When I make a lot of connections to the server, the server's lwip
> stack MEMP_TCP_SEG will be leaked.
> if I add lock in my time functions where I call tcp_close or
> tcp_abort, then the MEMP_TCP_SEG will be released well, but in this
> case , MEMP_TCP_SEG will be released slowly than before and slow than
> TCP_PCB be released.
> 
> If I set TCP_MSG 50, when more than 8 have been used, TCP_MSG will be
> leaked ( in this case, I didn't add lock in tcp_close and tcp_abort ).
> 
> What is the metter. and What should I do?

As I said before: make sure that your timer functions and other threads
are not running at the same time in the lwIP code!  Only one thread at
once should be allowed.  It's not sufficient to just protect tcp_close
or tcp_abort with locks.  You have to protect *everything*.

Kieran





reply via email to

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