store_gcov_u64(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ store_gcov_u64(9) ✨

okay so bestie, welcome to the Kernel API Manual πŸ’… this one's from the kernel gcov corner of the universe and it's lowkey iconic β€” it's all about writing a 64-bit number into a buffer in gcov format. let's get into it 🫢


🌸 NAME 🌸

store_gcov_u64 β€” store a 64 bit number in gcov format into a buffer πŸ’–


πŸ¦‹ SYNOPSIS πŸ¦‹

size_t store_gcov_u64 (void *buffer , size_t off , u64 v );

πŸŽ€ ARGUMENTS πŸŽ€

  • buffer β€” the target buffer, or NULL (yes, NULL is a whole valid vibe here πŸ™ˆ)
  • off β€” the offset into the buffer, like where in the lineup we're putting this thing
  • v β€” the value to be stored, the main character of this function ngl πŸ‘‘

πŸ’œ DESCRIPTION πŸ’œ

so the number format here is defined by gcc, and it's giving very specific ✨ the numbers get recorded in the 32 bit unsigned binary form of the endianness of the machine that's generating the file. iykyk, endianness matters, no cap πŸ’€

64 bit numbers are stored as two 32 bit numbers, with the low part first β€” low part walks in first, periodt πŸ’…

it returns the number of bytes stored. and if buffer is NULL? it literally doesn't store anything. nothing. zero. it's a vibe check and the vibe is "no" 😭


πŸ”₯ SEE ALSO πŸ”₯


that's the whole page bestie, go forth and store those u64s with main character energy πŸ‘‘πŸ’–

β€” from ./kernel/gcov, dated October 2026, with love and also a little bit of endianness discourse πŸŽ€β­πŸ¦‹

πŸ“¦ where this page comes from