3 ms·
Exceptions aren't what's keeping people from using the still in embedded context's, it's the dynamic memory management.
by monocasa 9y ago
Exceptions aren't what's keeping people from using the still in embedded context's, it's the dynamic memory management.
- proverbialbunny 9y agoDynamic memory management? What part of C++ do you mean? I'm unfamiliar. Surely not unique_ptr, I would think. C allocates on the heap too, so I must be misunderstanding.
- monocasa 9y agoPretty much all heap allocation outside of init time is verboten in embedded contexts, whether C or C++. So yes, the regular unique_ptr, vector, some lambdas that heap allocated their captured, etc. You're not allowed to use malloc in C either. Check out MISRA C, and the JSF C++ Standard for examples of embedded code standards.