BSON_REALLOC_FUNC(3)

NAME
bson_realloc_func

SYNOPSIS
typedef void *(*bson_realloc_func) (void   *mem,
                                    size_t  num_bytes,
                                    void   *ctx);

PARAMETERS

.B mem
    A memory region.

.B num_bytes
    A size_t containing the requested size.

.B ctx
    A consumer-specific pointer or NULL .

DESCRIPTION
This is a prototype for pluggable realloc functions used through the Libbson library. If you wish to use a custom allocator this is one way to do it. Additionally, bson_realloc_ctx(3) is a default implementation of this prototype.

COLOPHON
This page is part of libbson. Please report any bugs at https://jira.mongodb.org/browse/CDRIVER.