memory.h
Go to the documentation of this file.
1 
32 void* wolfSSL_Malloc(size_t size, void* heap, int type);
33 
68 void wolfSSL_Free(void *ptr, void* heap, int type);
69 
104 void* wolfSSL_Realloc(void *ptr, size_t size, void* heap, int type);
105 
151 int wolfSSL_SetAllocators(wolfSSL_Malloc_cb,
152  wolfSSL_Free_cb,
153  wolfSSL_Realloc_cb);
154 
187 int wolfSSL_StaticBufferSz(byte* buffer, word32 sz, int flag);
188 
219 int wolfSSL_MemoryPaddingSz(void);
220 
282 int wolfSSL_CTX_load_static_memory(WOLFSSL_CTX** ctx, wolfSSL_method_func method,
283  unsigned char* buf, unsigned int sz, int flag, int max);
284 
322 int wolfSSL_CTX_is_static_memory(WOLFSSL_CTX* ctx, WOLFSSL_MEM_STATS* mem_stats);
323 
358 int wolfSSL_is_static_memory(WOLFSSL* ssl, WOLFSSL_MEM_CONN_STATS* mem_stats);
359 
410 int wc_LoadStaticMemory(WOLFSSL_HEAP_HINT* hint, unsigned char* buf, unsigned int sz,
411  int flag, int max);
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...
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 ...
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 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...
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 configu...
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 informat...
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...
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. The returned value, if positive, is the computed buffer size to use.
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 ...
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...