BSON_REALLOC(3)

BSON_REALLOC πŸ’…

okay so bestie, welcome to the BSON_REALLOC page from libbson β€” yes, the manual name is right there, we're being cute about it. This is the group chat where we talk about resizing memory without pretending it's glamorous. ✨

🌸 SYNOPSIS 🌸

void *
bson_realloc (void *mem, size_t num_bytes);

πŸŽ€ PARAMETERS πŸŽ€

  • mem β€” a memory region. that's it, that's the vibe.
  • num_bytes β€” a size_t containing the new requested size. slay.

πŸ’– DESCRIPTION πŸ’–

This is a portable realloc() wrapper. portable, as in it's the wrapper you can take places.

If num_bytes is 0, then the allocation will be freed. bye-bye allocation 🫢

If there was a failure to allocate num_bytes bytes, the process will be aborted. 😭 like, full stop, no soft launch.

WARNING: This function will abort on failure to allocate memory. not a drill, bestie. πŸ’€

πŸ¦‹ RETURNS πŸ¦‹

A pointer to a memory region which HAS NOT been zeroed. read that again: HAS NOT been zeroed. no clean slate, no free zeros, iykyk.

πŸ‘‘ AUTHOR πŸ‘‘

MongoDB, Inc

2009-present, MongoDB, Inc.


mwah πŸ’‹ this iconic little page is from libbson 2.5.6, dated Oct 09, 2026. periodt.

πŸ“¦ where this page comes from