obj_to_location(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’« obj_to_location β€” the kernel function that decodes your object value (manual page 9, kernel API vibes)

okay so bestie, welcome to the obj_to_location(9) glow-up πŸ’… this is the Kernel API Manual entry for obj_to_location, and it's literally the inverse-vibe decoder for zsmalloc land β€” it takes an encoded object value and hands you back where that object actually lives. no cap, it's giving "reverse the encoding and tell me the tea." 🫢


✨ NAME ✨

obj_to_location β€” get (<zpdesc>, <obj_idx>) from encoded object value 🌸


πŸŽ€ SYNOPSIS πŸŽ€

void obj_to_location (unsigned long obj , struct zpdesc **zpdesc ,
       unsigned int *obj_idx );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • obj β€” the encoded object value πŸ’– like, this is the mystery little value you're feeding in, and it's encoded, so we're about to un-encode it, periodt.
  • zpdesc β€” zpdesc object resides in zspage ✨ (yes, that's the prose from the page verbatim-vibe β€” the zpdesc is the one hanging out in the zspage, iykyk).
  • obj_idx β€” object index πŸ”₯ the index of the object, served fresh through the pointer.

πŸ‘‘ SEE ALSO πŸ‘‘


ngl bestie, double-check the pointer types before you go printing stuff β€” zpdesc and obj_idx are both out-params here (double pointer and pointer respectively), so they're where the function writes its answers πŸ’€ the return type is void, so don't go looking for a return value, it's not coming 😭

and that's the whole page, bestie β€” no more options, no more flags, that's the entire tea πŸ’… this one shipped out of ./mm in October 2026, so go forth and decode those object values with main character energy πŸ‘‘βœ¨

πŸ“¦ where this page comes from