summaryrefslogtreecommitdiffstats
path: root/cpukit/score/src/heapfree.c
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2014-11-28 11:53:55 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2014-11-28 13:09:11 +0100
commitd006b46df31f6e5f28237fe40eafb135e684b739 (patch)
treee3f5956ae801329ae8f2891e9a62734833daa1d2 /cpukit/score/src/heapfree.c
parentscore: Return heap stats via _Heap_Get_information (diff)
downloadrtems-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 'cpukit/score/src/heapfree.c')
-rw-r--r--cpukit/score/src/heapfree.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/cpukit/score/src/heapfree.c b/cpukit/score/src/heapfree.c
index 4e69146232..13bf5eed81 100644
--- a/cpukit/score/src/heapfree.c
+++ b/cpukit/score/src/heapfree.c
@@ -201,6 +201,7 @@ bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr )
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
+ stats->lifetime_freed += block_size;
return( true );
}