Just to make it clear from the beginning, im forced to use a heap allocator not because I wish to, but because we have to rely on libraries that , unfortunately, rely on it and would simply not work without them.
A great example is Any SSL/TLS library out there.
Mbedtls forces you to use heap as well as wolfssl. Only other option is sometimes stacks in the size of half of the chips ram.
Now to the point.
From all the reading that I've don't on the forums and looking at chibios code ( which is probably the cleanest codebase I've ever seen ) my understanding is :
1. Chibios default heap allocator is suitable when a simple heap usage is needed , it doesn't have memory coalescence management so memory fragmentation could be a problem
2. I studied the options in chcfg.h called CH_CFG_MALLOC_HEAP I believe which should just put wrappers under standard libc heap calls but doing a search found that this macro is not used anywhere
The code base I have is chibios/rt 3.1.3 and hal 4.0.2 I believe
So is there still an option to use lets say IAR dlib heap allocator wrapped in chibios for mutual exclusion like FreeRtos does it for example or there is a better way?
Again, I'm not a big malloc fN, but sometimes there is no choice and memory pools don't cut it either