QB_RB_SPACE_USED(3)
π QB_RB_SPACE_USED(3) π
okay so bestie, welcome to the libqb Programmer's Manual β¨ this one's a lil baby page but it's IMPORTANT, so lock in π«Ά
πΈ NAME πΈ
qb_rb_space_used β the total amount of data in the buffer, fr fr π
β¨ SYNOPSIS β¨
#include <qb/qbrb.h>
ssize_t qb_rb_space_used(
qb_ringbuffer_t *rb /* ringbuffer instance */
);
π PARAMS π
rbβ ringbuffer instance π« (yes that's it, that's the whole param list, she's low maintenance)
π DESCRIPTION π
no cap, there's no extra prose here in the original β the whole vibe is the note below π
π NOTE π
this count includes the chunk headers β that's 8 bytes per chunk π so when you're doing your math, don't forget to account for the headers too, or the vibe check will fail π
heads up bestie:qb_rb_space_usedis giving total data in the buffer, not free space. if that's what you wanted, you wantqb_rb_space_freeinstead, iykyk π
π SEE ALSO π
qb_rb_close(3)qb_rb_refcount_get(3)qb_rb_chmod(3)qb_rb_chown(3)qb_rb_open(3)qb_rb_write_to_file(3)qb_rb_create_from_file(3)qb_rb_chunks_used(3)qb_rb_chunk_reclaim(3)qb_rb_chunk_write(3)qb_rb_shared_user_data_get(3)qb_rb_chunk_commit(3)qb_rb_chunk_peek(3)qb_rb_space_free(3)qb_rb_name_get(3)qb_rb_chunk_alloc(3)qb_rb_chunk_read(3)
the whole ringbuffer friend group, periodt π go read them all, they ate π
π¦ COPYRIGHT π¦
Copyright (C) 2010-2020 Red Hat, Inc. β slay, thanks Red Hat π«Ά
and that's the whole page, bestie!! this one came from LIBQB, dated 2025-09-16, and it lives at QB_RB_SPACE_USED(3) in the manual π go forth and count your chunks (headers included, don't forget!!) β¨π
π¦ where this page comes from
- fedora 44: libqb-devel 2.0.9-2.fc44 Β· LGPL-2.1-or-later
- fedora 44: libqb-devel 2.0.9-2.fc44 Β· LGPL-2.1-or-later
- ubuntu resolute: libqb-dev 2.0.9-1ubuntu1 Β· LGPL-2.1-or-later
- ubuntu stonking: libqb-dev 2.0.9-1ubuntu1 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms