Count allocs without side-effects
At the end of the benchmark program, heap stats are printed, and these stats will be wrong if we reset counters in the middle. Also remove the function to reset counters, in order to encourage other programs to behave correctly as well. Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
This commit is contained in:
parent
cd4ad0c67a
commit
6ced002a69
3 changed files with 4 additions and 14 deletions
|
@ -528,12 +528,6 @@ void mbedtls_memory_buffer_alloc_count_get( size_t *alloc_count, size_t *free_co
|
|||
*free_count = heap.free_count;
|
||||
}
|
||||
|
||||
void mbedtls_memory_buffer_alloc_count_reset( void )
|
||||
{
|
||||
heap.alloc_count = 0;
|
||||
heap.free_count = 0;
|
||||
}
|
||||
|
||||
void mbedtls_memory_buffer_alloc_max_get( size_t *max_used, size_t *max_blocks )
|
||||
{
|
||||
*max_used = heap.maximum_used;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue