mbedtls doesn't release all resources
Posted: Fri Jan 19, 2018 3:42 pm
I'm working on https mbedtls and can't seem to recover all resources after finishing a function.
I log starting freeheap before calling the routine then log at various points trying to understand where memory is being consumed.
The https routine is a task. Max heap consumption is about 30k in the task. After finishing the https call, I do the following:
mbedtls_ssl_session_reset(&ssl);
mbedtls_net_free(&server_fd);
vTaskDelete(NULL);
Freeheap after the task has completed is 14k lower than what it was at task start. This is just a program snippet and nothing else is running.
I log starting freeheap before calling the routine then log at various points trying to understand where memory is being consumed.
The https routine is a task. Max heap consumption is about 30k in the task. After finishing the https call, I do the following:
mbedtls_ssl_session_reset(&ssl);
mbedtls_net_free(&server_fd);
vTaskDelete(NULL);
Freeheap after the task has completed is 14k lower than what it was at task start. This is just a program snippet and nothing else is running.