qb_rb_chunk_alloc3
Allocate space for a chunk of the given size.
Usage
#include <qb/qbrb.h>
void * qb_rb_chunk_alloc(
qb_ringbuffer_t *rb, /* ringbuffer instance */
size_t len /* (in) the size to allocate. */
);
Params
rb ringbuffer instance
len (in) the size to allocate.
Overview
If type == QB_RB_FLAG_OVERWRITE and NULL is returned, memory corruption of the memory file has occurred. The ringbuffer should be destroyed. If type == QB_RB_NORMAL then when there is not enough space it will return NULL.
Return value
pointer to chunk to write to, or NULL (if no space).
Releases
4 releases since Debian 11 (Bullseye); the text changed 3 times.