This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

how to handle _free_box() failure?

Hello - we're using RL-ARM RTX on an STM32F105 based product, and passing messages between tasks in our system strictly via mailboxes and memory pools, using _alloc_box() and _free_box() to obtain and release messages.

Occasionally we see _free_box() return a failure value. Is there a recommended best practice for handling this? Clearly we do need to return that memory to the pool - without a better solution, I might loop trying repeated calls to _free_box() with delays in between. The examples I've seen online don't suggest what a failure might indicate, or what the recommended way to handle them is.

Or does this suggest there might be some problem with the memory pool itself, and the most appropriate fix might be elsewhere?

Thanks for any tips!

0