This page has been automatically translated using the Google Translate API services. We are working on improving texts. Thank you for your understanding and patience.
Generic memory blocks, dynamically reserved.
Buffer objects are simply dynamically stored memory blocks and stored in the Heap Segment. They are useful for sharing generic data between different functions or threads. For the latter case, they must be protected by a Mutex if several threads can access it concurrently (they are not thread-safe). They are of fixed size. Once created, they can not be resized, although they can be rewritten as many times as necessary.
Create a new buffer.
Buffer size in bytes.
The new buffer.
Destroy the buffer.
void buffer_destroy(Buffer **buffer);
The buffer. It will be set to
Gets the size of the buffer.
The size of the buffer in bytes.
Gets a pointer to the contents of the buffer.
Pointer to the contents of the buffer that can be used to read or write.