Can an infinite loop be dangerous to embedded systems due to memory leak?

Can an infinite loop be dangerous to embedded systems due to memory leak?
A. Yes
B. Yes, but only if it is used within a limited scope
C. No
D. Yes, but only for some Arduino Boards
 
Answer: A
Explanation: Infinite loops are a good way to ensure that your program is running continuously without any interruptions. However in programming languages that allow raw memory management, it’s very easy to have a memory leak, or a continuous allocation of memory which eventually leads to the programming using all the memory available and eventually crashing the entire system.
 

Tìm kiếm

Back
Top