fgraph_reserve_data(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ fgraph_reserve_data ✨

okay so bestie, welcome to fgraph_reserve_data β€” that's a section 9 (kernel API) manual page, and yes it's giving "we're doing kernel tracing today" πŸŽ€


🌸 NAME 🌸

fgraph_reserve_data β€” reserve storage on the task's ret_stack, no cap πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

void * fgraph_reserve_data (int idx , int size_bytes );

πŸ“ ARGUMENTS πŸ“

  • idx β€” the index of fgraph_array. that's it, that's the whole vibe.
  • size_bytes β€” the size in bytes to reserve. literally how much space you want, in bytes πŸ‘‘

πŸ’œ DESCRIPTION πŸ’œ

so here's the tea β˜• β€” this function reserves space of up to FGRAPH_MAX_DATA_SIZE bytes on the task's ret_stack shadow stack, for a given fgraph_ops, during the entryfunc call. iconic behaviour honestly.

if entryfunc returns zero, the storage is discarded β€” like, gone, poof, never happened 😭

an entryfunc can only call this once per iteration. one. single. time. don't be greedy babes πŸ™ˆ

the fgraph_ops retfunc can then retrieve this stored data with fgraph_retrieve_data. cute little hand-off, we love to see it 🫢


πŸ”₯ RETURN πŸ”₯

on success, you get a pointer to the data on the stack ✨

otherwise? NULL 😭 and there's two reasons that can happen:

  • there's not enough space left on the ret_stack for the data
  • or fgraph_reserve_data was called more than once for a single entryfunc call (told you β€” once per iteration, bestie πŸ’€)

πŸ‘‘ SEE ALSO πŸ‘‘

go read them, they're all main character energy fr fr 🌈


and that's the whole page!! this little icon lives in ./kernel/trace, dated October 2026, part of the Kernel API Manual. mwah, slay, periodt πŸ’–πŸ’…πŸŽ€

πŸ“¦ where this page comes from