vrb_capacity(3)
π vrb_capacity(3) β the VRB Programmer's Manual, bestie edition π
okay so you're reading the manual page for vrb_capacity, and honestly? you're in the right place. this is a little slice of the VRB Programmer's Manual and it's about to make your whole buffer situation make sense β¨
πΈ NAME πΈ
vrb_capacity β return the buffer capacity, that's it, that's the whole thing, she's simple and she's iconic π
π¦ LIBRARY π¦
-lvrb β link her in and you're golden π«Ά
β¨ SYNOPSIS β¨
#include <vrb.h>
size_t vrb_capacity(vrb_p vrb);
π DESCRIPTION π
okay so here's the tea: vrb_capacity returns the total buffer capacity of the given virtual ring buffer β and bestie, listen, that's the capacity after any rounding up that happened during initialization π so if the buffer got all glowed-up to a bigger size than you asked for, this is how you find out the real number. no cap.
π§ ARGUMENTS π§
vrb_p vrbβ specifies the virtual ring buffer you want to obtain the capacity of. literally just hand her the buffer and she'll tell you how big she is π
β οΈ and likeβ¦ if you give her a NULL or invalid pointer? results are unpredictable and are likely to be disasterous π like genuinely disastrous with a capital D, don't do that to her, don't do that to yourself, please do a vibe check on your pointer first π
β RETURN VALUE β
size_tβ the total capacity of the virtual ring buffer is returned. you asked, she answered, periodt π
π₯ SEE ALSO π₯
vrb(3), vrb_data_len(3), vrb_data_ptr(3), vrb_destroy(3), vrb_get(3), vrb_get_min(3), vrb_give(3), vrb_init(3), vrb_init_opt(3), vrb_is_empty(3), vrb_is_full(3), vrb_is_not_empty(3), vrb_is_not_full(3), vrb_move(3), vrb_new(3), vrb_new_opt(3), vrb_put(3), vrb_put_all(3), vrb_read(3), vrb_read_min(3), vrb_resize(3), vrb_space_len(3), vrb_space_ptr(3), vrb_take(3), vrb_uninit(3), vrb_write(3), vrb_write_min(3)
like, the whole friend group honestly π«Ά go read them too, iykyk π
mwah, that's the page! this lil gem is from the vrb fam, dated 2002-09-30, and it lives at page vrb_capacity(3) β stan a vintage manual that still slays πππΈ
π¦ where this page comes from
- nixos 26.05: vrb 0.5.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms