memory.h
1 
27 WOLFSSL_API void* wolfSSL_Malloc(size_t size, void* heap, int type, const char* func, unsigned int line);
28 
58 WOLFSSL_API void wolfSSL_Free(void *ptr, void* heap, int type, const char* func, unsigned int line);
59 
88 WOLFSSL_API void* wolfSSL_Realloc(void *ptr, size_t size, void* heap, int type, const char* func, unsigned int line);
89 
119 WOLFSSL_API void* wolfSSL_Malloc(size_t size, void* heap, int type);
120 
154 WOLFSSL_API void* wolfSSL_Realloc(void *ptr, size_t size, void* heap, int type);
155 
179 WOLFSSL_API void wolfSSL_Free(void *ptr, const char* func, unsigned int line);
180 
232 WOLFSSL_API int wolfSSL_SetAllocators(wolfSSL_Malloc_cb,
233  wolfSSL_Free_cb,
234  wolfSSL_Realloc_cb);
235 
268 WOLFSSL_API int wolfSSL_StaticBufferSz(byte* buffer, word32 sz, int flag);
269 
300 WOLFSSL_API int wolfSSL_MemoryPaddingSz(void);
WOLFSSL_API void wolfSSL_Free(void *ptr, void *heap, int type, const char *func, unsigned int line)
This function calls a custom free function, if one has been defined, or simply calls the default C fr...
WOLFSSL_API void * wolfSSL_Realloc(void *ptr, size_t size, void *heap, int type, const char *func, unsigned int line)
This function calls a custom realloc function, if one has been defined, or simply calls the default C...
WOLFSSL_API void * wolfSSL_Malloc(size_t size, void *heap, int type, const char *func, unsigned int line)
This function calls the custom malloc function, if one has been defined, or simply calls the default ...
WOLFSSL_API 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.
Definition: memory.c:451
WOLFSSL_API 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.
Definition: memory.c:461
WOLFSSL_API 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 ...
Definition: memory.c:102