memory.h
Functions
Name | |
---|---|
void * | wolfSSL_Malloc(size_t size, void * heap, int type) This function is similar to malloc(), but calls the memory allocation function which wolfSSL has been configured to use. By default, wolfSSL uses malloc(). This can be changed using the wolfSSL memory abstraction layer _ see wolfSSL_SetAllocators(). Note wolfSSL_Malloc is not called directly by wolfSSL, but instead called by macro XMALLOC. For the default build only the size argument exists. If using WOLFSSL_STATIC_MEMORY build then heap and type arguments are included. |
void | wolfSSL_Free(void * ptr, void * heap, int type) This function is similar to free(), but calls the memory free function which wolfSSL has been configured to use. By default, wolfSSL uses free(). This can be changed using the wolfSSL memory abstraction layer _ see wolfSSL_SetAllocators(). Note wolfSSL_Free is not called directly by wolfSSL, but instead called by macro XFREE. For the default build only the ptr argument exists. If using WOLFSSL_STATIC_MEMORY build then heap and type arguments are included. |
void * | wolfSSL_Realloc(void * ptr, size_t size, void * heap, int type) This function is similar to realloc(), but calls the memory re_allocation function which wolfSSL has been configured to use. By default, wolfSSL uses realloc(). This can be changed using the wolfSSL memory abstraction layer _ see wolfSSL_SetAllocators(). Note wolfSSL_Realloc is not called directly by wolfSSL, but instead called by macro XREALLOC. For the default build only the size argument exists. If using WOLFSSL_STATIC_MEMORY build then heap and type arguments are included. |
int | wolfSSL_SetAllocators(wolfSSL_Malloc_cb , wolfSSL_Free_cb , wolfSSL_Realloc_cb ) This function registers the allocation functions used by wolfSSL. By default, if the system supports it, malloc/free and realloc are used. Using this function allows the user at runtime to install their own memory handlers. |
int | wolfSSL_StaticBufferSz(byte * buffer, word32 sz, int flag) This function is available when static memory feature is used (–enable_staticmemory). It gives the optimum buffer size for memory “buckets”. This allows for a way to compute buffer size so that no extra unused memory is left at the end after it has been partitioned. For the none _ex version of this function the default bucket and distribution list set during compile time is used. The returned value, if positive, is the computed buffer size to use. |
int | wolfSSL_MemoryPaddingSz(void ) This function is available when static memory feature is used (–enable_staticmemory). It gives the size of padding needed for each partition of memory. This padding size will be the size needed to contain a memory management structure along with any extra for memory alignment. |
int | wolfSSL_CTX_load_static_memory(WOLFSSL_CTX * ctx, wolfSSL_method_func method, unsigned char * buf, unsigned int sz, int flag, int max) This function is used to set aside static memory for a CTX. Memory set aside is then used for the CTX’s lifetime and for any SSL objects created from the CTX. By passing in a NULL ctx pointer and a wolfSSL_method_func function the creation of the CTX itself will also use static memory. wolfSSL_method_func has the function signature of WOLFSSL_METHOD (wolfSSL_method_func)(void heap);. Passing in 0 for max makes it behave as if not set and no max concurrent use restrictions is in place. The flag value passed in determines how the memory is used and behavior while operating. Available flags are the following. |
int | wolfSSL_CTX_is_static_memory(WOLFSSL_CTX * ctx, WOLFSSL_MEM_STATS * mem_stats) This function does not change any of the connections behavior and is used only for gathering information about the static memory usage. |
int | wolfSSL_is_static_memory(WOLFSSL * ssl, WOLFSSL_MEM_CONN_STATS * mem_stats) wolfSSL_is_static_memory is used to gather information about a SSL’s static memory usage. The return value indicates if static memory is being used and WOLFSSL_MEM_CONN_STATS will be filled out if and only if the flag WOLFMEM_TRACK_STATS was passed to the parent CTX when loading in static memory. |
int | wc_LoadStaticMemory(WOLFSSL_HEAP_HINT * hint, unsigned char * buf, unsigned int sz, int flag, int max) This function is used to set aside static memory for wolfCrypt use. Memory can be used by passing the created heap hint into functions. An example of this is when calling wc_InitRng_ex. The flag value passed in determines how the memory is used and behavior while operating, in general wolfCrypt operations will use memory from a WOLFMEM_GENERAL pool. Available flags are the following. |
int | wc_LoadStaticMemory_ex(WOLFSSL_HEAP_HINT * hint, unsigned char * buf, unsigned int sz, int flag, int max, word16 * bucket_sizes, int bucket_count) This function is used to set aside static memory for wolfCrypt use with custom bucket sizes and distributions. Memory can be used by passing the created heap hint into functions. This extended version allows for custom bucket sizes and distributions instead of using the default predefined sizes. |
WOLFSSL_HEAP_HINT * | wolfSSL_SetGlobalHeapHint(WOLFSSL_HEAP_HINT * hint) This function sets a global heap hint that will be used when NULL heap hint is passed to memory allocation functions. This allows for setting a default heap hint that will be used across the entire application. |
WOLFSSL_HEAP_HINT * | wolfSSL_GetGlobalHeapHint(void ) This function gets the current global heap hint that is used when NULL heap hint is passed to memory allocation functions. |
int | wolfSSL_SetDebugMemoryCb(wolfSSL_DebugMemoryCb cb) This function sets a debug callback function for static memory allocation tracking. Used with WOLFSSL_STATIC_MEMORY_DEBUG_CALLBACK build option. The callback function will be called during memory allocation and deallocation operations to provide debugging information. |
int | wc_UnloadStaticMemory(WOLFSSL_HEAP_HINT * hint) This function frees static memory heap and associated mutex. Should be called when done using static memory allocation to properly clean up resources. |
int | wolfSSL_StaticBufferSz_ex(unsigned int listSz, const word32 * sizeList, const word32 * distList, byte * buffer, word32 sz, int flag) This function calculates the required buffer size for static memory allocation with custom bucket sizes and distributions. This extended version allows for custom bucket sizes instead of using the default predefined sizes. |
Functions Documentation
function wolfSSL_Malloc
void * wolfSSL_Malloc(
size_t size,
void * heap,
int type
)
This function is similar to malloc(), but calls the memory allocation function which wolfSSL has been configured to use. By default, wolfSSL uses malloc(). This can be changed using the wolfSSL memory abstraction layer - see wolfSSL_SetAllocators(). Note wolfSSL_Malloc is not called directly by wolfSSL, but instead called by macro XMALLOC. For the default build only the size argument exists. If using WOLFSSL_STATIC_MEMORY build then heap and type arguments are included.
Parameters:
- size size, in bytes, of the memory to allocate
- heap heap hint to use for memory. Can be NULL
- type dynamic type (see DYNAMIC_TYPE_ list in types.h)
See:
Return:
- pointer If successful, this function returns a pointer to allocated memory.
- error If there is an error, NULL will be returned.
Example
int* tenInts = (int*)wolfSSL_Malloc(sizeof(int)*10);
function wolfSSL_Free
void wolfSSL_Free(
void * ptr,
void * heap,
int type
)
This function is similar to free(), but calls the memory free function which wolfSSL has been configured to use. By default, wolfSSL uses free(). This can be changed using the wolfSSL memory abstraction layer - see wolfSSL_SetAllocators(). Note wolfSSL_Free is not called directly by wolfSSL, but instead called by macro XFREE. For the default build only the ptr argument exists. If using WOLFSSL_STATIC_MEMORY build then heap and type arguments are included.
Parameters:
- ptr pointer to the memory to be freed.
- heap heap hint to use for memory. Can be NULL
- type dynamic type (see DYNAMIC_TYPE_ list in types.h)
See:
- wolfSSL_Alloc
- wolfSSL_Realloc
- wolfSSL_SetAllocators
- XMALLOC
- XFREE
- XREALLOC
Return: none No returns.
Example
int* tenInts = (int*)wolfSSL_Malloc(sizeof(int)*10);
// process data as desired
...
if(tenInts) {
wolfSSL_Free(tenInts);
}
function wolfSSL_Realloc
void * wolfSSL_Realloc(
void * ptr,
size_t size,
void * heap,
int type
)
This function is similar to realloc(), but calls the memory re-allocation function which wolfSSL has been configured to use. By default, wolfSSL uses realloc(). This can be changed using the wolfSSL memory abstraction layer - see wolfSSL_SetAllocators(). Note wolfSSL_Realloc is not called directly by wolfSSL, but instead called by macro XREALLOC. For the default build only the size argument exists. If using WOLFSSL_STATIC_MEMORY build then heap and type arguments are included.
Parameters:
- ptr pointer to the previously-allocated memory, to be reallocated.
- size number of bytes to allocate.
- heap heap hint to use for memory. Can be NULL
- type dynamic type (see DYNAMIC_TYPE_ list in types.h)
See:
Return:
- pointer If successful, this function returns a pointer to re-allocated memory. This may be the same pointer as ptr, or a new pointer location.
- Null If there is an error, NULL will be returned.
Example
int* tenInts = (int*)wolfSSL_Malloc(sizeof(int)*10);
int* twentyInts = (int*)wolfSSL_Realloc(tenInts, sizeof(int)*20);
function wolfSSL_SetAllocators
int wolfSSL_SetAllocators(
wolfSSL_Malloc_cb ,
wolfSSL_Free_cb ,
wolfSSL_Realloc_cb
)
This function registers the allocation functions used by wolfSSL. By default, if the system supports it, malloc/free and realloc are used. Using this function allows the user at runtime to install their own memory handlers.
Parameters:
- malloc_function memory allocation function for wolfSSL to use. Function signature must match wolfSSL_Malloc_cb prototype, above.
- free_function memory free function for wolfSSL to use. Function signature must match wolfSSL_Free_cb prototype, above.
- realloc_function memory re-allocation function for wolfSSL to use. Function signature must match wolfSSL_Realloc_cb prototype, above.
See: none
Return:
- Success If successful this function will return 0.
- BAD_FUNC_ARG is the error that will be returned if a function pointer is not provided.
Example
static void* MyMalloc(size_t size)
{
// custom malloc function
}
static void MyFree(void* ptr)
{
// custom free function
}
static void* MyRealloc(void* ptr, size_t size)
{
// custom realloc function
}
// Register custom memory functions with wolfSSL
int ret = wolfSSL_SetAllocators(MyMalloc, MyFree, MyRealloc);
if (ret != 0) {
// failed to set memory functions
}
function wolfSSL_StaticBufferSz
int wolfSSL_StaticBufferSz(
byte * buffer,
word32 sz,
int flag
)
This function is available when static memory feature is used (–enable-staticmemory). It gives the optimum buffer size for memory “buckets”. This allows for a way to compute buffer size so that no extra unused memory is left at the end after it has been partitioned. For the none _ex version of this function the default bucket and distribution list set during compile time is used. The returned value, if positive, is the computed buffer size to use.
Parameters:
- buffer pointer to buffer
- size size of buffer
- type desired type of memory ie WOLFMEM_GENERAL or WOLFMEM_IO_POOL
See:
Return:
- Success On successfully completing buffer size calculations a positive value is returned. This returned value is for optimum buffer size.
- Failure All negative values are considered to be error cases.
Example
byte buffer[1000];
word32 size = sizeof(buffer);
int optimum;
optimum = wolfSSL_StaticBufferSz(buffer, size, WOLFMEM_GENERAL);
if (optimum < 0) { //handle error case }
printf(“The optimum buffer size to make use of all memory is %d\n”,
optimum);
...
function wolfSSL_MemoryPaddingSz
int wolfSSL_MemoryPaddingSz(
void
)
This function is available when static memory feature is used (–enable-staticmemory). It gives the size of padding needed for each partition of memory. This padding size will be the size needed to contain a memory management structure along with any extra for memory alignment.
Parameters:
- none No parameters.
See:
Return:
- On successfully memory padding calculation the return value will be a positive value
- All negative values are considered error cases.
Example
int padding;
padding = wolfSSL_MemoryPaddingSz();
if (padding < 0) { //handle error case }
printf(“The padding size needed for each \”bucket\” of memory is %d\n”,
padding);
// calculation of buffer for IO POOL size is number of buckets
// times (padding + WOLFMEM_IO_SZ)
...
function wolfSSL_CTX_load_static_memory
int wolfSSL_CTX_load_static_memory(
WOLFSSL_CTX ** ctx,
wolfSSL_method_func method,
unsigned char * buf,
unsigned int sz,
int flag,
int max
)
This function is used to set aside static memory for a CTX. Memory set aside is then used for the CTX’s lifetime and for any SSL objects created from the CTX. By passing in a NULL ctx pointer and a wolfSSL_method_func function the creation of the CTX itself will also use static memory. wolfSSL_method_func has the function signature of WOLFSSL_METHOD* (wolfSSL_method_func)(void heap);. Passing in 0 for max makes it behave as if not set and no max concurrent use restrictions is in place. The flag value passed in determines how the memory is used and behavior while operating. Available flags are the following.
Parameters:
- ctx address of pointer to a WOLFSSL_CTX structure.
- method function to create protocol. (should be NULL if ctx is not also NULL)
- buf memory to use for all operations.
- sz size of memory buffer being passed in.
- flag type of memory.
- max max concurrent operations.
See:
Return:
- If successful, SSL_SUCCESS will be returned.
- All unsuccessful return values will be less than 0 or equal to SSL_FAILURE.
0 - default general memory
WOLFMEM_IO_POOL - used for input/output buffer when sending receiving messages. Overrides general memory, so all memory in buffer passed in is used for IO. WOLFMEM_IO_FIXED - same as WOLFMEM_IO_POOL but each SSL now keeps two buffers to themselves for their lifetime. WOLFMEM_TRACK_STATS - each SSL keeps track of memory stats while running.
Example
WOLFSSL_CTX* ctx;
WOLFSSL* ssl;
int ret;
unsigned char memory[MAX];
int memorySz = MAX;
unsigned char IO[MAX];
int IOSz = MAX;
int flag = WOLFMEM_IO_FIXED | WOLFMEM_TRACK_STATS;
...
// create ctx also using static memory, start with general memory to use
ctx = NULL:
ret = wolfSSL_CTX_load_static_memory(&ctx, wolfSSLv23_server_method_ex, memory, memorySz, 0,
MAX_CONCURRENT_HANDSHAKES);
if (ret != SSL_SUCCESS) {
// handle error case
}
// load in memory for use with IO
ret = wolfSSL_CTX_load_static_memory(&ctx, NULL, IO, IOSz, flag, MAX_CONCURRENT_IO);
if (ret != SSL_SUCCESS) {
// handle error case
}
...
function wolfSSL_CTX_is_static_memory
int wolfSSL_CTX_is_static_memory(
WOLFSSL_CTX * ctx,
WOLFSSL_MEM_STATS * mem_stats
)
This function does not change any of the connections behavior and is used only for gathering information about the static memory usage.
Parameters:
- ctx a pointer to a WOLFSSL_CTX structure, created using wolfSSL_CTX_new().
- mem_stats structure to hold information about staic memory usage.
See:
Return:
- A value of 1 is returned if using static memory for the CTX is true.
- 0 is returned if not using static memory.
Example
WOLFSSL_CTX* ctx;
int ret;
WOLFSSL_MEM_STATS mem_stats;
...
//get information about static memory with CTX
ret = wolfSSL_CTX_is_static_memory(ctx, &mem_stats);
if (ret == 1) {
// handle case of is using static memory
// print out or inspect elements of mem_stats
}
if (ret == 0) {
//handle case of ctx not using static memory
}
...
function wolfSSL_is_static_memory
int wolfSSL_is_static_memory(
WOLFSSL * ssl,
WOLFSSL_MEM_CONN_STATS * mem_stats
)
wolfSSL_is_static_memory is used to gather information about a SSL’s static memory usage. The return value indicates if static memory is being used and WOLFSSL_MEM_CONN_STATS will be filled out if and only if the flag WOLFMEM_TRACK_STATS was passed to the parent CTX when loading in static memory.
Parameters:
- ssl a pointer to a WOLFSSL structure, created using wolfSSL_new().
- mem_stats structure to contain static memory usage
See:
Return:
- A value of 1 is returned if using static memory for the CTX is true.
- 0 is returned if not using static memory.
Example
WOLFSSL* ssl;
int ret;
WOLFSSL_MEM_CONN_STATS mem_stats;
...
ret = wolfSSL_is_static_memory(ssl, mem_stats);
if (ret == 1) {
// handle case when is static memory
// investigate elements in mem_stats if WOLFMEM_TRACK_STATS flag
}
...
function wc_LoadStaticMemory
int wc_LoadStaticMemory(
WOLFSSL_HEAP_HINT * hint,
unsigned char * buf,
unsigned int sz,
int flag,
int max
)
This function is used to set aside static memory for wolfCrypt use. Memory can be used by passing the created heap hint into functions. An example of this is when calling wc_InitRng_ex. The flag value passed in determines how the memory is used and behavior while operating, in general wolfCrypt operations will use memory from a WOLFMEM_GENERAL pool. Available flags are the following.
Parameters:
- hint WOLFSSL_HEAP_HINT structure to use
- buf memory to use for all operations.
- sz size of memory buffer being passed in.
- flag type of memory.
- max max concurrent operations (handshakes, IO).
See: none
Return:
- If successful, 0 will be returned.
- All unsuccessful return values will be less than 0.
WOLFMEM_GENERAL - default general memory
WOLFMEM_IO_POOL - used for input/output buffer when sending receiving messages. Overrides general memory, so all memory in buffer passed in is used for IO. WOLFMEM_IO_FIXED - same as WOLFMEM_IO_POOL but each SSL now keeps two buffers to themselves for their lifetime. WOLFMEM_TRACK_STATS - each SSL keeps track of memory stats while running
Example
WOLFSSL_HEAP_HINT hint;
int ret;
unsigned char memory[MAX];
int memorySz = MAX;
int flag = WOLFMEM_GENERAL | WOLFMEM_TRACK_STATS;
...
// load in memory for use
ret = wc_LoadStaticMemory(&hint, memory, memorySz, flag, 0);
if (ret != SSL_SUCCESS) {
// handle error case
}
...
ret = wc_InitRng_ex(&rng, hint, 0);
// check ret value
function wc_LoadStaticMemory_ex
int wc_LoadStaticMemory_ex(
WOLFSSL_HEAP_HINT * hint,
unsigned char * buf,
unsigned int sz,
int flag,
int max,
word16 * bucket_sizes,
int bucket_count
)
This function is used to set aside static memory for wolfCrypt use with custom bucket sizes and distributions. Memory can be used by passing the created heap hint into functions. This extended version allows for custom bucket sizes and distributions instead of using the default predefined sizes.
Parameters:
- hint WOLFSSL_HEAP_HINT structure to use
- buf memory to use for all operations.
- sz size of memory buffer being passed in.
- flag type of memory.
- max max concurrent operations (handshakes, IO).
- bucket_sizes array of bucket sizes to use
- bucket_count number of bucket sizes in the array
See:
Return:
- If successful, 0 will be returned.
- All unsuccessful return values will be less than 0.
Example
WOLFSSL_HEAP_HINT hint;
int ret;
unsigned char memory[MAX];
int memorySz = MAX;
int flag = WOLFMEM_GENERAL | WOLFMEM_TRACK_STATS;
word16 bucket_sizes[] = {64, 128, 256, 512, 1024};
int bucket_count = 5;
...
// load in memory for use with custom bucket sizes
ret = wc_LoadStaticMemory_ex(&hint, memory, memorySz, flag, 0,
bucket_sizes, bucket_count);
if (ret != SSL_SUCCESS) {
// handle error case
}
...
ret = wc_InitRng_ex(&rng, hint, 0);
// check ret value
function wolfSSL_SetGlobalHeapHint
WOLFSSL_HEAP_HINT * wolfSSL_SetGlobalHeapHint(
WOLFSSL_HEAP_HINT * hint
)
This function sets a global heap hint that will be used when NULL heap hint is passed to memory allocation functions. This allows for setting a default heap hint that will be used across the entire application.
Parameters:
- hint WOLFSSL_HEAP_HINT structure to use as the global heap hint
See:
Return: Returns the previous global heap hint that was set.
Example
WOLFSSL_HEAP_HINT hint;
WOLFSSL_HEAP_HINT* prev_hint;
int ret;
unsigned char memory[MAX];
int memorySz = MAX;
...
// load in memory for use
ret = wc_LoadStaticMemory(&hint, memory, memorySz, WOLFMEM_GENERAL, 0);
if (ret != SSL_SUCCESS) {
// handle error case
}
// set as global heap hint
prev_hint = wolfSSL_SetGlobalHeapHint(&hint);
if (prev_hint != NULL) {
// there was a previous global heap hint
}
function wolfSSL_GetGlobalHeapHint
WOLFSSL_HEAP_HINT * wolfSSL_GetGlobalHeapHint(
void
)
This function gets the current global heap hint that is used when NULL heap hint is passed to memory allocation functions.
Parameters:
- none No parameters.
See:
Return: Returns the current global heap hint, or NULL if none is set.
Example
WOLFSSL_HEAP_HINT* current_hint;
...
current_hint = wolfSSL_GetGlobalHeapHint();
if (current_hint != NULL) {
// there is a global heap hint set
// can use current_hint for operations
}
function wolfSSL_SetDebugMemoryCb
int wolfSSL_SetDebugMemoryCb(
wolfSSL_DebugMemoryCb cb
)
This function sets a debug callback function for static memory allocation tracking. Used with WOLFSSL_STATIC_MEMORY_DEBUG_CALLBACK build option. The callback function will be called during memory allocation and deallocation operations to provide debugging information.
Parameters:
- cb debug callback function to set
See: none
Return:
- If successful, 0 will be returned.
- All unsuccessful return values will be less than 0.
Example
static void debug_memory_cb(const char* func, const char* file, int line,
void* ptr, size_t size, int type)
{
printf("Memory %s: %s:%d ptr=%p size=%zu type=%d\n",
func, file, line, ptr, size, type);
}
...
// set debug callback
int ret = wolfSSL_SetDebugMemoryCb(debug_memory_cb);
if (ret != 0) {
// handle error case
}
function wc_UnloadStaticMemory
int wc_UnloadStaticMemory(
WOLFSSL_HEAP_HINT * hint
)
This function frees static memory heap and associated mutex. Should be called when done using static memory allocation to properly clean up resources.
Parameters:
- hint WOLFSSL_HEAP_HINT structure to unload
See:
Return:
- If successful, 0 will be returned.
- All unsuccessful return values will be less than 0.
Example
WOLFSSL_HEAP_HINT hint;
int ret;
unsigned char memory[MAX];
int memorySz = MAX;
...
// load in memory for use
ret = wc_LoadStaticMemory(&hint, memory, memorySz, WOLFMEM_GENERAL, 0);
if (ret != SSL_SUCCESS) {
// handle error case
}
// use memory for operations
...
// cleanup when done
ret = wc_UnloadStaticMemory(&hint);
if (ret != 0) {
// handle error case
}
function wolfSSL_StaticBufferSz_ex
int wolfSSL_StaticBufferSz_ex(
unsigned int listSz,
const word32 * sizeList,
const word32 * distList,
byte * buffer,
word32 sz,
int flag
)
This function calculates the required buffer size for static memory allocation with custom bucket sizes and distributions. This extended version allows for custom bucket sizes instead of using the default predefined sizes.
Parameters:
- bucket_sizes array of bucket sizes to use
- bucket_count number of bucket sizes in the array
- flag desired type of memory ie WOLFMEM_GENERAL or WOLFMEM_IO_POOL
See:
Return:
- On successfully completing buffer size calculations a positive value is returned.
- All negative values are considered to be error cases.
Example
word32 sizeList[] = {64, 128, 256, 512, 1024};
word32 distList[] = {1, 2, 1, 1, 1};
int listSz = 5;
int optimum;
optimum = wolfSSL_StaticBufferSz_ex(listSz, sizeList, distList, NULL, 0,
WOLFMEM_GENERAL);
if (optimum < 0) { //handle error case }
printf("The optimum buffer size with custom buckets is %d\n", optimum);
...
Source code
void* wolfSSL_Malloc(size_t size, void* heap, int type);
void wolfSSL_Free(void *ptr, void* heap, int type);
void* wolfSSL_Realloc(void *ptr, size_t size, void* heap, int type);
int wolfSSL_SetAllocators(wolfSSL_Malloc_cb,
wolfSSL_Free_cb,
wolfSSL_Realloc_cb);
int wolfSSL_StaticBufferSz(byte* buffer, word32 sz, int flag);
int wolfSSL_MemoryPaddingSz(void);
int wolfSSL_CTX_load_static_memory(WOLFSSL_CTX** ctx, wolfSSL_method_func method,
unsigned char* buf, unsigned int sz, int flag, int max);
int wolfSSL_CTX_is_static_memory(WOLFSSL_CTX* ctx, WOLFSSL_MEM_STATS* mem_stats);
int wolfSSL_is_static_memory(WOLFSSL* ssl, WOLFSSL_MEM_CONN_STATS* mem_stats);
int wc_LoadStaticMemory(WOLFSSL_HEAP_HINT* hint, unsigned char* buf, unsigned int sz,
int flag, int max);
int wc_LoadStaticMemory_ex(WOLFSSL_HEAP_HINT* hint, unsigned char* buf, unsigned int sz,
int flag, int max, word16* bucket_sizes, int bucket_count);
WOLFSSL_HEAP_HINT* wolfSSL_SetGlobalHeapHint(WOLFSSL_HEAP_HINT* hint);
WOLFSSL_HEAP_HINT* wolfSSL_GetGlobalHeapHint(void);
int wolfSSL_SetDebugMemoryCb(wolfSSL_DebugMemoryCb cb);
int wc_UnloadStaticMemory(WOLFSSL_HEAP_HINT* hint);
int wolfSSL_StaticBufferSz_ex(unsigned int listSz,
const word32 *sizeList, const word32 *distList,
byte* buffer, word32 sz, int flag);
Updated on 2025-08-11 at 01:15:05 +0000