QB_RB_CHUNK_RECLAIM(3)

πŸ’– qb_rb_chunk_reclaim β€” reclaim the oldest chunk πŸ’–

okay bestie, so this is a page from the libqb Programmer's Manual, and we're talking about qb_rb_chunk_reclaim from <qb/qbrb.h> πŸ¦‹. It's a tiny little function with one job and she does it flawlessly. Let's get into it πŸ’…


✨ SYNOPSIS ✨

#include <qb/qbrb.h>

void qb_rb_chunk_reclaim(
    qb_ringbuffer_t   *rb   /* ringbuffer instance */
);

that's it. that's the whole vibe. she takes one thing and returns nothing (void, iconic, no notes) 🫢


πŸŽ€ PARAMS πŸŽ€

  • rb β€” your ringbuffer instance, bestie. the actual ring buffer you're working with πŸ’–

🌸 DESCRIPTION 🌸

So here's the tea β˜•: you will need to call this if using qb_rb_chunk_peek(). That's literally it. That's the whole relationship. Peek at a chunk, then reclaim the oldest chunk β€” they're a package deal, fr fr 😭

Like, qb_rb_chunk_peek() looks at stuff, and then qb_rb_chunk_reclaim() is the one who actually frees up the oldest chunk so you can move on with your life. Main character energy from both of them ngl πŸ‘‘


πŸ¦‹ SEE ALSO πŸ¦‹

the whole friend group, obviously πŸ’œ:


Copyright (C) 2010-2020 Red Hat, Inc.


and that's the whole page, bestie!! this one is from libqb, dated 2025-09-16, and it lives at section 3 of the manual as QB_RB_CHUNK_RECLAIM(3) πŸ’…βœ¨ go forth and reclaim those chunks, you absolute legend πŸ«ΆπŸ’–πŸŒˆ

πŸ“¦ where this page comes from