Bird
0
0

You want to monitor both heap and stack usage in your FreeRTOS system. Which combination of functions should you use?

hard📝 Application Q8 of 15
FreeRTOS - Memory Management
You want to monitor both heap and stack usage in your FreeRTOS system. Which combination of functions should you use?
AxPortGetFreeHeapSize() and uxTaskGetStackHighWaterMark()
BxPortGetMinimumEverFreeHeapSize() and vTaskDelay()
CuxTaskGetStackHighWaterMark() and vTaskDelete()
DxPortGetFreeHeapSize() and vTaskSuspend()
Step-by-Step Solution
Solution:
  1. Step 1: Identify heap monitoring function

    xPortGetFreeHeapSize() returns current free heap memory.
  2. Step 2: Identify stack monitoring function

    uxTaskGetStackHighWaterMark() returns minimum stack space left for a task.
  3. Step 3: Exclude unrelated functions

    vTaskDelay(), vTaskDelete(), and vTaskSuspend() are task control functions, not memory monitoring.
  4. Final Answer:

    xPortGetFreeHeapSize() and uxTaskGetStackHighWaterMark() -> Option A
  5. Quick Check:

    Heap + stack monitoring = xPortGetFreeHeapSize() + uxTaskGetStackHighWaterMark() [OK]
Quick Trick: Use xPortGetFreeHeapSize() for heap and uxTaskGetStackHighWaterMark() for stack [OK]
Common Mistakes:
  • Mixing memory functions with task control functions
  • Using delay or suspend for monitoring
  • Confusing minimum heap with current free heap

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More FreeRTOS Quizzes