DOKK / manpages / debian 12 / libbson-doc / bson_realloc_func.3.en
BSON_REALLOC_FUNC(3) libbson BSON_REALLOC_FUNC(3)

bson_realloc_func - bson_realloc_func

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


  • mem: A memory region.
  • num_bytes: A size_t containing the requested size.
  • ctx: A consumer-specific pointer or NULL.

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() is a default implementation of this prototype.

MongoDB, Inc

2017-present, MongoDB, Inc

October 20, 2022 1.23.1