CRYPTO_set_mem_functions

Install process-wide CRYPTO memory allocator callbacks (before first allocation).

Synopsis

Declared in <openssl/crypto.h>

int
CRYPTO_set_mem_functions(
    CRYPTO_malloc_fn malloc_fn,
    CRYPTO_realloc_fn realloc_fn,
    CRYPTO_free_fn free_fn);

Return Value

1 on success, or 0 if allocators cannot be changed (already in use).

Parameters

NameDescription
malloc_fnReplacement malloc, or NULL to leave the current malloc unchanged.
realloc_fnReplacement realloc, or NULL to leave the current realloc unchanged.
free_fnReplacement free, or NULL to leave the current free unchanged.