Machine-translated by Google. Questions are authored in English.
Top

Discussion

Heap fragmentation is a hazard in long-running embedded systems because

  • A.the kernel is unable to switch tasks at all while the heap is in use
  • B.the heap must be erased before each allocation
  • C.an allocation may fail although the total free memory is sufficient
  • D.the heap loses its contents when the system is reset

Answer: C

Free memory broken into many small pieces cannot satisfy a request for one large block, and the failure appears after weeks of running rather than in test. Fixed-size block pools avoid it entirely, which is why they are common in embedded work.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.