bson_t * bson_sized_new (size_t size);
The size to pre-allocate for the underlying buffer.
Thefunction shall create a new on the heap with a preallocated buffer. This is useful if you have a good idea of the size of the resulting document.
A newly allocatedthat should be freed with .