Create an uninitialized binary buffer and load a datum referring to it.

Synopsis

Declared in <bdld_datum.h>

static
void*
createUninitializedBinary(
    Datum* result,
    SizeType size,
    AllocatorType const& allocator);

Description

Load the specified result with a reference to a newly created binary buffer of the specified size, using the specified allocator to supply memory, and return the address of this buffer. The behavior is undefined unless size <= UINT_MAX. Note that the caller is responsible for initializing the returned buffer with binary data.

Return Value

the address of the uninitialized binary buffer

Parameters

Name

Description

result

receives the datum that refers to the buffer

size

size of the binary buffer in bytes

allocator

memory allocator to use

Created with MrDocs