mbedtls_memory_buffer_alloc_init() is only used within mbedTLS.
 
Symbols
loading...
Files
loading...
CodeScopeSTM32 Libraries and SamplesmbedTLSmbedtls_memory_buffer_alloc_init()

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 );

Arguments

buf

buffer to use as heap

len

size of the buffer

Notes

This code is not optimized and provides a straight-forward implementation of a stack-based memory allocator.

References

LocationText
memory_buffer_alloc.h:73
void mbedtls_memory_buffer_alloc_init( unsigned char *buf, size_t len );