diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2014-11-28 11:53:55 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2014-11-28 13:09:11 +0100 |
commit | d006b46df31f6e5f28237fe40eafb135e684b739 (patch) | |
tree | e3f5956ae801329ae8f2891e9a62734833daa1d2 /cpukit/score/include/rtems/score/heap.h | |
parent | score: Return heap stats via _Heap_Get_information (diff) | |
download | rtems-d006b46df31f6e5f28237fe40eafb135e684b739.tar.bz2 |
score: Add heap statistics
Add lifetime bytes allocated and freed since they were present in the
malloc statistics. Add number of failed allocations.
Diffstat (limited to '')
-rw-r--r-- | cpukit/score/include/rtems/score/heap.h | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/cpukit/score/include/rtems/score/heap.h b/cpukit/score/include/rtems/score/heap.h index 6042a13bf2..f20b4e6651 100644 --- a/cpukit/score/include/rtems/score/heap.h +++ b/cpukit/score/include/rtems/score/heap.h @@ -257,6 +257,20 @@ struct Heap_Block { */ typedef struct { /** + * @brief Lifetime number of bytes allocated from this heap. + * + * This value is an integral multiple of the page size. + */ + uint64_t lifetime_allocated; + + /** + * @brief Lifetime number of bytes freed to this heap. + * + * This value is an integral multiple of the page size. + */ + uint64_t lifetime_freed; + + /** * @brief Instance number of this heap. */ uint32_t instance; @@ -303,17 +317,22 @@ typedef struct { uint32_t max_search; /** + * @brief Total number of searches. + */ + uint32_t searches; + + /** * @brief Total number of successful allocations. */ uint32_t allocs; /** - * @brief Total number of searches ever. + * @brief Total number of failed allocations. */ - uint32_t searches; + uint32_t failed_allocs; /** - * @brief Total number of successful calls to free. + * @brief Total number of successful frees. */ uint32_t frees; |