[lwip-users] memp_malloc: out of memory in pool TCP_PCB
Anirudha Sarangi
未读,2011年11月4日 下午4:32:00
收件人 Mailing list for lwIP users
Hi,
Recently after fixing my previous issue (I had an issue in sys_arch.c), I came across one interesting issue for lwip140 which is not seen in lwip130.
I have a RTOS based application running and I have a small webserver application.
I saw that after refreshing the webpage several times on the host PC, I start getting messages:
memp_malloc: out of memory in pool TCP_PCB
Inspite of these messages webserver works. But these messages are really annoying and tell us that something horrible has happened.
I checked the memory pools. I have defined "MEMP_NUM_TCP_PCB as 64".
So precisely after around 64 http requests, I start getting the above message.
If I reduce MEMP_NUM_TCP_PCB to 32, I start getting the messages after around 32 refreshes.
Is it some kind of bug? Is there anything I should be doing while closing the socket each time other than calling lwip_close ?
regards
Anirudha
Simon Goldschmidt
未读,2011年11月4日 下午6:45:23
收件人 Anirudha Sarangi、Mailing list for lwIP users
Anirudha Sarangi <anirudha...@yahoo.com> wrote:
memp_malloc: out of memory in pool TCP_PCB
Inspite of these messages webserver works. But these messages are really annoying and tell us that something horrible has happened.
No, that's normal: you ran out of pcbs, but the tcp code then closes that oldest pcb in TIME-WAIT state and then calls memp_malloc again, which then succeeds. This is why the web server continues to run normally.
In tcp, pcbs stay in TME_WAIT state for some minutes, so you would have to configure the tcp pcb pool very large to get rid of this message.
Simon
Anirudha Sarangi
未读,2011年11月4日 下午7:19:09
收件人 Mailing list for lwIP users
Thanks a lot for the clarification.
_______________________________________________
lwip-users mailing list
lwip-...@nongnu.org
lwip-users Info Page