I found the root cause, it was one socket which was not getting freed up.

Thanks,
Rahul


On Mon, Jan 9, 2012 at 10:55 AM, Rahul Gundecha <[email protected]>wrote:

> I am using stats_display() function (from ./src/include/lwip/stats.h) to
> display the stats about pcb usage. And I observe that the used udp pcb
> count go on increasing till the available limit and then I get errors
> whenever I try to create new udp pcb.
>
>                MEM UDP_PCB
> [218.174045] : avail: 8
> [218.176040] : used: 8
> [218.178007] : max: 8
> [218.180016] : err: 2
>
> Here I am puzzled with the comment in the code.
>
>
> "Call sequence here is:
> lwip_close -> netconn_delete -> netconn_free
>
> The comments on netconn_free() function says this -
>  * Delete a netconn and all its resources.
>  * The pcb is NOT freed (since we might not be in the right thread context
> do this)."
>
> Thanks,
> Rahul
>
>
>
> On Sat, Jan 7, 2012 at 9:34 PM, Kieran Mansley <[email protected]> wrote:
>
>>
>> On 6 Jan 2012, at 14:12, Rahul Gundecha wrote:
>>
>> > In my code,  the sockets are closed by calling lwip_close().
>>
>> lwip_close() should be sufficient if you're using the sockets API.  Can
>> you give more details of what shows that the PCBs are not being freed?
>>
>> Kieran
>> _______________________________________________
>> lwip-users mailing list
>> [email protected]
>> https://lists.nongnu.org/mailman/listinfo/lwip-users
>>
>
>
_______________________________________________
lwip-users mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to