prb_record_text_space(9)
π 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 ifehas been successfully reserved usingprb_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:
- Kernel file
./kernel/printk/printk_ringbuffer.c printk_ringbuffer overview(9)prb_reserve_in_last(9)prb_reserve(9)prb_commit(9)prb_final_commit(9)prb_next_reserve_seq(9)prb_read_valid(9)prb_read_valid_info(9)prb_first_valid_seq(9)prb_next_seq(9)prb_init(9)
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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms