4 ms·
WOW ! << Do not use direct or indirect recursion. Do not use dynamic memory allocation after task initialization. >> I think they should use COBOL, it's built
by vans 12y ago
WOW !
<<
Do not use direct or indirect recursion.
Do not use dynamic memory allocation after task
initialization.
>>
I think they should use COBOL, it's built in :)
- Jtsummers 12y agoThose are standard restrictions for embedded real-time systems, especially if the language itself doesn't offer guarantees on tail-call optimization (like the ML family, Erlang and others do). You have to guarantee the behavior of the program, and recursion (especially unbounded memory usage as in many C implementations) can royally screw things up. You may still have infinite loops because of an error in a for loop's terminating condition, but without dynamic memory and exploding stack usage you'll at least have enough memory left to deal with it when the watchdog timer kicks in.