Adapt memory_buffer_alloc to calloc

This commit is contained in:
Manuel Pégourié-Gonnard 2015-05-26 17:42:13 +02:00
parent b9ef1182f3
commit 200e73179e
2 changed files with 27 additions and 14 deletions

View file

@ -58,10 +58,10 @@ extern "C" {
/**
* \brief Initialize use of stack-based memory allocator.
* The stack-based allocator does memory management inside the
* presented buffer and does not call malloc() and free().
* It sets the global mbedtls_malloc() and mbedtls_free() pointers
* presented buffer and does not call calloc() and free().
* It sets the global mbedtls_calloc() and mbedtls_free() pointers
* to its own functions.
* (Provided mbedtls_malloc() and mbedtls_free() are thread-safe if
* (Provided mbedtls_calloc() and mbedtls_free() are thread-safe if
* MBEDTLS_THREADING_C is defined)
*
* \note This code is not optimized and provides a straight-forward