mbedtls_memory_buffer_alloc_init() function
Initialize use of stack-based memory allocator. The stack-based allocator does memory management inside the 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_calloc() and mbedtls_free() are thread-safe if MBEDTLS_THREADING_C is defined)
Syntax
void mbedtls_memory_buffer_alloc_init( unsigned char *buf,
size_t len );
Notes
This code is not optimized and provides a straight-forward implementation of a stack-based memory allocator.
![]()
void mbedtls_memory_buffer_alloc_init( unsigned char *buf, size_t len );