prb_record_text_space(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… prb_record_text_space β€” a.k.a. the "how much room did my text actually eat" check πŸ“

okay bestie, welcome to prb_record_text_space(9) from the Kernel API Manual β€” yes that's a section 9 page, we're in kernel-dev territory, hydrate and stay with me 🫢


✨ NAME ✨

prb_record_text_space β€” literally just ask the ringbuffer: "hey, how much actual space is my reserved entry's text data taking up rn?" πŸ’– Query the full actual used ringbuffer space for the text data of a reserved entry. That's the whole vibe.


🌸 SYNOPSIS 🌸

unsigned int prb_record_text_space (struct prb_reserved_entry *e );

that's it. one argument. one unsigned int back. we love a low-drama signature πŸ‘‘


πŸŽ€ ARGUMENTS πŸŽ€

  • e β€” the entry you already successfully reserved, and the one you're lowkey interrogating rn. it must be successfully reserved, or this whole thing is a no πŸ’€

πŸ¦‹ DESCRIPTION πŸ¦‹

so this is the public function β€” the one writers like you get to call β€” and it tells you how much actual space is being used inside the ringbuffer to store the text data of the entry you point at 🌈

like, not the vibes-estimate. the actual space. for the text data. of that specific entry. iconic behavior honestly.

⚠️ important caveat bestie, do NOT skip: this function is only valid if e has been successfully reserved using prb_reserve. that's the whole entry ticket. no successful reserve, no query. periodt πŸ’…

⭐ CONTEXT ⭐

Any context. fr fr β€” any context. she does not care where you're calling from, she's chill like that 🧚


πŸ”₯ RETURN πŸ”₯

The size in bytes used by the text data of the associated record. bytes! that's your number! go spend it wisely πŸ’œ


πŸ‘‘ SEE ALSO πŸ‘‘

the whole friend group, no cap:


aaaaand that's the page πŸŽ€ cute lil sign-off: this one lives under ./kernel/printk and it's dated October 2026, so yeah, she's fresh πŸ’– now go reserve something and measure it, bestie πŸ¦‹βœ¨

πŸ“¦ where this page comes from