mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-28 00:21:48 +03:00
Buffer allocator threading support
This commit is contained in:
@ -71,6 +71,8 @@ int memory_set_own( void * (*malloc_func)( size_t ),
|
||||
* presented buffer and does not call malloc() and free().
|
||||
* It sets the global polarssl_malloc() and polarssl_free() pointers
|
||||
* to its own functions.
|
||||
* (Provided polarssl_malloc() and polarssl_free() are thread-safe if
|
||||
* POLARSSL_THREADING_C is defined)
|
||||
*
|
||||
* \note This code is not optimized and provides a straight-forward
|
||||
* implementation of a stack-based memory allocator.
|
||||
@ -82,6 +84,11 @@ int memory_set_own( void * (*malloc_func)( size_t ),
|
||||
*/
|
||||
int memory_buffer_alloc_init( unsigned char *buf, size_t len );
|
||||
|
||||
/**
|
||||
* \brief Free the mutex for thread-safety and clear remaining memory
|
||||
*/
|
||||
void memory_buffer_alloc_free();
|
||||
|
||||
/**
|
||||
* \brief Determine when the allocator should automatically verify the state
|
||||
* of the entire chain of headers / meta-data.
|
||||
|
Reference in New Issue
Block a user