欢迎访问 生活随笔!

生活随笔

当前位置: 首页 >

[lwip-users] memp_malloc: out of memory in pool TCP_PCB

发布时间:2025/4/5 43 豆豆
生活随笔 收集整理的这篇文章主要介绍了 [lwip-users] memp_malloc: out of memory in pool TCP_PCB 小编觉得挺不错的,现在分享给大家,帮大家做个参考.

[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

《新程序员》:云原生和全面数字化实践50位技术专家共同创作,文字、视频、音频交互阅读

总结

以上是生活随笔为你收集整理的[lwip-users] memp_malloc: out of memory in pool TCP_PCB的全部内容,希望文章能够帮你解决所遇到的问题。

如果觉得生活随笔网站内容还不错,欢迎将生活随笔推荐给好友。