dmi_buffer_create
Description
The dmi_buffer_create function creates an empty buffer belonging to
context. No memory for the data is allocated until the buffer is written
to or grown.
A buffer owns the bytes it holds, whether they have been read from a device, from a dump, or written by the framework itself, so that everything reading them - the decoded structures, the strings they refer to and the binary members referring to the data in place - is valid for as long as the buffer is. Buffers live on their own rather than within the scope which makes them, because the structures decoded from a buffer outlive whatever has read it in.
Data is read and written through dmi_reader_t and dmi_writer_t, which
are cursors over a range of a buffer and hold no memory of their own.
The caller is responsible for destroying the buffer with
dmi_buffer_destroy once nothing refers to the data any more.