bson_malloc0 (3) - Linux Manuals
bson_malloc0: This is a portable malloc() wrapper that also sets the memory to zero. Similar to calloc().
Command to display bson_malloc0
manual in Linux: $ man 3 bson_malloc0
NAME
bson_malloc0() - This is a portable malloc() wrapper that also sets the memory to zero. Similar to calloc().
SYNOPSIS
void *
bson_malloc0 (size_t num_bytes);
PARAMETERS
- num_bytes
-
A size_t.
DESCRIPTION
This is a portable
malloc(3)
wrapper that also sets the memory to zero. Similar to
calloc(3)
\&.
In general, this function will return an allocation at least
sizeof(void*)
bytes or bigger.
If there was a failure to allocate
num_bytes
bytes, the process will be aborted.
NOTE
-
This function will abort on failure to allocate memory.
RETURNS
A pointer to a memory region which
HAS
been zeroed.
COLOPHON
This page is part of libbson.
Please report any bugs at
https://jira.mongodb.org/browse/CDRIVER.
Pages related to bson_malloc0
- bson_malloc (3) - This is a portable malloc() wrapper.
- bson_md5_append (3) - Feeds more data into the MD5 algorithm.
- bson_md5_finish (3) - Completes the MD5 algorithm and stores the digest in digest.
- bson_md5_init (3) - Initialize a new instance of the MD5 algorithm.
- bson_md5_t (3) - BSON MD5 Abstraction
- bson_mem_restore_vtable (3) - This function shall restore the default memory allocator to be used by Libbson.
- bson_mem_set_vtable (3) - This function shall install a new memory allocator to be used by Libbson.
- bson_append_array (3) - The bson_append_array() function shall append child to bson using the specified key. The type of the field will be an array, but it is the responsibility of the caller to ensure that the keys of child are properly formatted with string keys such as "0", "1", "2" and so forth.
- bson_append_array_begin (3) - The bson_append_array_begin() function shall begin appending an array field to bson. This allows for incrementally building a sub-array. Doing so will generally yield better performance as you will serialize to a single buffer. When done building the sub-array, the caller MUST call bson_append_array_end().