diff options
Diffstat (limited to 'cpukit/score/include/rtems/score/heap.h')
-rw-r--r-- | cpukit/score/include/rtems/score/heap.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/cpukit/score/include/rtems/score/heap.h b/cpukit/score/include/rtems/score/heap.h index 6eee1c745b..1996fb80ff 100644 --- a/cpukit/score/include/rtems/score/heap.h +++ b/cpukit/score/include/rtems/score/heap.h @@ -522,6 +522,33 @@ bool _Heap_Walk( ); /** + * @brief Heap block visitor. + * + * @see _Heap_Iterate(). + * + * @retval true Stop the iteration. + * @retval false Continue the iteration. + */ +typedef bool (*Heap_Block_visitor)( + const Heap_Block *block, + uintptr_t block_size, + bool block_is_used, + void *visitor_arg +); + +/** + * @brief Iterates over all blocks of the heap. + * + * For each block the @a visitor with the argument @a visitor_arg will be + * called. + */ +void _Heap_Iterate( + Heap_Control *heap, + Heap_Block_visitor visitor, + void *visitor_arg +); + +/** * @brief Returns information about used and free blocks for the heap @a heap * in @a info. */ |