Hardfault when using calloc repetedly in STM32G4
Hi Community,
I recently came across an issue with calloc used inside a FreeRTOS thread where it returns a valid address after initialization. Still, while storing data (out of 67 bytes), it stores only a few of them (around 12 bytes) and hits a hard fault when freeing.
This behavior is not immediately after initializing a thread but after some iterations of calloc followed by free.
Why is that so?
Do you have any suggestions on how to avoid these scenarios and ensure a stable system by utilizing FreeRTOS features?
