mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-28 00:21:48 +03:00
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:
@ -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;
|
||||
|
Reference in New Issue
Block a user