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