Intermediate Embedded Systems & IoT
Q41 / 100

In a memory-constrained microcontroller, why might a developer prefer statically allocated memory over dynamic allocation (malloc/free)?

Correct! Well done.

Incorrect.

The correct answer is A) Static allocation avoids fragmentation and allocation failures at runtime, providing predictable memory usage critical for reliability in long-running embedded systems

A

Correct Answer

Static allocation avoids fragmentation and allocation failures at runtime, providing predictable memory usage critical for reliability in long-running embedded systems

Explanation

Dynamic memory allocation can lead to fragmentation and unpredictable failures over long uptimes with limited RAM; statically allocated buffers (sized at compile time) provide deterministic, predictable memory behavior.

Progress
41/100