I am directing the issue -  https://github.com/ARMmbed/mbedtls/issues/3146

The content of the issue is - Hello,

Currently I am using mbed tls 2.16.3 and I am using it on STM32L4xx platform.
Before I was using dynamic memory allocation (heap), now planning to shift to static memory allocation.
I am using x509 ecc based certificate.
I am using DTLS handshake.
I am also using "mbedtls_memory_buffer_alloc_status" to print the status of static buffer.

The queries are -

  1. I am not sure how much memory to assign?
  2. I am not able to understand the message -

Current use: 33 blocks / 2508 bytes, max: 99 blocks / 5392 bytes (total 8560 bytes), alloc / free: 8803 / 8771
What is blocks here and how many bytes per block?
My understanding is that - out of 99 blocks, 33 blocks are used. Is it right?

  1. Does the memory fragmentation and de-fragmentation is handled inside mbedTLS itself? And also after every handshake, does it release the used memory buffer for the connection?

I need the values correct to make sure not to get the memory allocation failure


Please help me in these queries.