relay_alloc_buf(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… relay_alloc_buf(9) πŸ’…

okay so welcome to the Kernel API Manual, bestie β€” this is the relay_alloc_buf(9) entry, and it’s giving β€œtiny but important allocation moment.” ✨


🌸 NAME 🌸

relay_alloc_buf β€” allocate a channel buffer. that’s the whole vibe πŸŽ€

✨ SYNOPSIS ✨

void * relay_alloc_buf (struct rchan_buf *buf , size_t *size );

πŸŽ€ ARGUMENTS πŸŽ€

  • buf β€” the buffer struct. the struct we’re working with, periodt πŸ’–
  • size β€” total size of the buffer. total total, not β€œish” 😌

πŸ’– DESCRIPTION πŸ’–

Returns a pointer to the resulting buffer, and NULL if unsuccessful. no cap, NULL is the β€œit didn’t work” signal 😭

The passed in size will get page aligned, if it isn’t already. so if it’s already page aligned, iconic; if not, it gets page aligned. that’s the rule ✨

lowkey important: unsuccessful means you get NULL back β€” that’s the failure state, bestie πŸ’€

πŸ¦‹ SEE ALSO πŸ¦‹

Kernel file ./kernel/relay.c β€” go look at the source, you gorgeous nerd πŸ‘‘


mwah πŸ’‹ this page is from ./kernel, dated October 2026, and it’s the relay_alloc_buf(9) manual. bye bestie, go be iconic with your buffers 🫢🌈

πŸ“¦ where this page comes from