lwip-devel
[Top][All Lists]
Advanced

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

Re: [lwip-devel] MEMP_TCP_SEG somehow being leaked so that they never be


From: geckook Xu
Subject: Re: [lwip-devel] MEMP_TCP_SEG somehow being leaked so that they never become available for reuse.
Date: Mon, 23 Apr 2007 10:32:06 +0800

after calling tcp_about(), it looks like the TCP_SEG and TCP_PCB will
be released, but I only found TCP_PCB  released, and the amount of
TCP_PCB malloced become zerro and  TCP_SEG and PBUF will never be
released.

wether there are somewhere in the code , the connection between
TCP_PCB and TCP_SEG will be breaked so that when release TCP_PCB but
don't release TCP_SEG.

I use an client on pc to connect to lwip stack, I found if the lwip
stack didn't respond  immediately or didn't reply , the TCP_SEG will
be leaked soon.

On 4/20/07, Jonathan Larmour <address@hidden> wrote:
geckook Xu wrote:
> When I make a lot of connections to the server, the server's lwip
> stack MEMP_TCP_SEG will be leaked.
>
> at this time, the TCP_PCB is 0, and PBUF have the same number of
> EMP_TCP_SEG.
>
> I think if it is because when release the TCP_PCB ,but didn't release
> the TCP_SEG.

The code certainly does release TCP SEGs in both the unsent and unacked
queues in tcp_abort() and tcp_pcb_remove().

How are you closing the connection? If you call tcp_close() and the
connection is in the ESTABLISHED state, it will not free up the SEGs
immediately. It needs to complete the closing process.

Jifl
--
eCosCentric Limited      http://www.eCosCentric.com/     The eCos experts
Barnwell House, Barnwell Drive, Cambridge, UK.       Tel: +44 1223 245571
Registered in England and Wales: Reg No 4422071.
------["The best things in life aren't things."]------      Opinions==mine


_______________________________________________
lwip-devel mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/lwip-devel





reply via email to

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