2022-08-09 01:07 AM
Hi all,
I am developing an application using bare TCP and UDP connections.
Since the new HAL implementation now uses custom PBuf allocation for Rx memories, I thought about killing the PBUF_POOL since it does not seem to be used anymore now.
I started by testing my application with statistics enabled and indeed, the usage count of memp_stats_PBUF_POOL stayed at zero all the time.
Setting PBUF_POOL_SIZE to 0 reduced my RAM usage as expected and the application is still running normally.
Am I missing anything here? Are you guys aware of some pitfall I did not see or do you think I am safe so far?
Solved! Go to Solution.
2023-02-10 10:13 AM
Probably too late to answer, sorry, but it might help others with same issue:
We can confirm that new HAL Ethernet implementation now uses custom PBuf allocation for Rx and PBUF_POOL is not used anymore in interface and apps.
But PBUF_POOL is used inside LwIP stack. In fact in LwIP\src\core\udp.c line 391 PBUF_POOL is used:
“q = pbuf_clone(PBUF_RAW, PBUF_POOL, p);�?
In your case, maybe PBUF_POOL is not used by LwIP stack but it can happen in other cases.
So before killing the PBUF_POOL, you have to verify that LwIP stack is not using PBUF_POOL first.
I hope it helps.
2023-02-10 10:13 AM
Probably too late to answer, sorry, but it might help others with same issue:
We can confirm that new HAL Ethernet implementation now uses custom PBuf allocation for Rx and PBUF_POOL is not used anymore in interface and apps.
But PBUF_POOL is used inside LwIP stack. In fact in LwIP\src\core\udp.c line 391 PBUF_POOL is used:
“q = pbuf_clone(PBUF_RAW, PBUF_POOL, p);�?
In your case, maybe PBUF_POOL is not used by LwIP stack but it can happen in other cases.
So before killing the PBUF_POOL, you have to verify that LwIP stack is not using PBUF_POOL first.
I hope it helps.