libressl-OPENSSL_malloc3
Legacy openssl memory allocation wrappers
Usage
Crypto Library (libcrypto, -lcrypto)
#include <openssl/crypto.h>
void *
OPENSSL_malloc(size_t num);
void
OPENSSL_free(void *addr);
char *
OPENSSL_strdup(const char *str);
void *
CRYPTO_malloc(size_t num, const char *file, int line);
void
CRYPTO_free(void *str, const char *, int);
char *
CRYPTO_strdup(const char *p, const char *file, int line);
Overview
Do not use any of the interfaces documented here in new code. They are provided purely for compatibility with legacy application code.
These functions are wrappers around the corresponding standard malloc(3), free(3), and strdup(3) functions.
The OPENSSL_*() functions are implemented as macros.
Return values
These functions return the same type and value as the corresponding standard functions.
Caveats
If interoperability with other implementations is required, memory returned by the library as bare pointers must be freed with OPENSSL_free().