vrb_capacity(3)

πŸ“¦ version 0.5.1, in nixos 26.05

πŸ’– 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