ucx
UAP Common Extensions
|
Structure for the UCX buffer data. More...
#include <buffer.h>
Data Fields | |
union { | |
char * space | |
Data is interpreted as text. | |
unsigned char * bytes | |
Data is interpreted as binary. | |
}; | |
A pointer to the buffer contents. | |
CxAllocator const * | allocator |
The allocator to use for automatic memory management. | |
size_t | pos |
Current position of the buffer. | |
size_t | capacity |
Current capacity (i.e. | |
size_t | size |
Current size of the buffer content. | |
size_t | flush_threshold |
The buffer may not extend beyond this threshold before starting to flush. | |
size_t | flush_blksize |
The block size for the elements to flush. | |
size_t | flush_blkmax |
The maximum number of blocks to flush in one cycle. | |
cx_write_func | flush_func |
The write function used for flushing. | |
void * | flush_target |
The target for flush_func . | |
int | flags |
Flag register for buffer features. | |
Structure for the UCX buffer data.
size_t cx_buffer_s::capacity |
Current capacity (i.e.
maximum size) of the buffer.
int cx_buffer_s::flags |
Flag register for buffer features.
size_t cx_buffer_s::flush_blkmax |
The maximum number of blocks to flush in one cycle.
Zero disables flushing entirely (this is the default). Set this to SIZE_MAX
to flush the entire buffer.
flush_blkmax
. size_t cx_buffer_s::flush_blksize |
The block size for the elements to flush.
Default is 4096 bytes.
cx_write_func cx_buffer_s::flush_func |
The write function used for flushing.
If NULL, the flushed content gets discarded.
size_t cx_buffer_s::flush_threshold |
The buffer may not extend beyond this threshold before starting to flush.
Default is SIZE_MAX
(flushing disabled when auto extension is enabled).