# Getting summary task info without excessive memory use

**URL:** <https://forums.freertos.org/t/getting-summary-task-info-without-excessive-memory-use/25034>\
**Category:** Kernel\
**Created:** [June 5, 2026, 4:05pm UTC](https://forums.freertos.org/t/getting-summary-task-info-without-excessive-memory-use/25034 "2026-06-05T16:05:08Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![dnadler](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/dnadler/32/35_2.png) [@dnadler](https://forums.freertos.org/u/dnadler)\
**Post date:** [July 26, 2026, 7:34pm UTC](https://forums.freertos.org/t/getting-summary-task-info-without-excessive-memory-use/25034/7 "2026-07-26T19:34:42Z")

</div>

Thanks to everyone at AWS who helped get this pull request in shape and merged!  
Best Regards, Dave

> <https://github.com/FreeRTOS/FreeRTOS-Kernel/pull/1439>
>
> Get task statistics for all tasks with less memory use, by doing it one task at …a time.
> Provide a public iterator over all tasks for diagnostics.
> 
> @aggarg - This is a better refactoring and does not increase stack space use (from #1424):
> \- The public iterator function is cleaner (passes task handle and state plus context to callback).
> \- Does not replicate task location code as in your suggested patch.
> \- Based on the latest development head for easier merge.
> \- Retested in my application.
> 
> Hope you approve!
> 
> 
> Description
> \-----------
> Add uxTaskCallForEachTask, which is the iteration portion of last released uxTaskGetSystemState. uxTaskCallForEachTask calls a user-provided callback once for each task (with the task handle and state, plus a context).
> 
> Refactor uxTaskGetSystemState so that it uses uxTaskCallForEachTask to fill in the pre-allocated array of TaskStatus\_t, preserving the existing uxTaskGetSystemState API for current users.
> 
> Test Steps
> \-----------
> 1. Use uxTaskCallForEachTask to observe task statistics for each task in the system.
> 2. Compare existing uxTaskGetSystemState output to new version.
> 
> Checklist:
> \----------
> \- \[x \] I have tested my changes. No regression in existing tests.
> \- \[\] I have modified and/or added unit-tests to cover the code changes in this Pull Request.
> 
> Related Issue
> \-----------
> Discussed on forum but no Github Issues.
> 
> 
> By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

---

_[View the full topic](https://forums.freertos.org/t/getting-summary-task-info-without-excessive-memory-use/25034)._
