damon_set_re...rams_default(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… damon_set_re...rams_default(9)

okay bestie, this one's a Kernel API Manual page, and it's literally the glow-up function for DAMON regions ✨ It's called damon_set_re...rams_default, and it's giving "set my region exactly how I asked, or just cover all of System RAM, no thoughts, head empty" πŸŽ€


🌸 NAME 🌸

damon_set_region_system_rams_default β€” sets the region of the monitoring target you hand it, either exactly as requested, or (plot twist) to cover all 'System RAM' resources πŸ’–


✨ SYNOPSIS ✨

int damon_set_region_system_rams_default (struct damon_target *t ,
       unsigned long *start , unsigned long *end , unsigned long addr_unit ,
       unsigned long min_region_sz );

🫢 ARGUMENTS 🫢

  • t β€” the monitoring target whose region we're setting. the main character of this whole operation tbh πŸ‘‘
  • start β€” pointer to the start address of the region πŸ“
  • end β€” pointer to the end address of the region πŸ“
  • addr_unit β€” the address unit for the damon_ctx of t. yes, specifically that target's ctx, iykyk πŸ¦‹
  • min_region_sz β€” the minimum region size. tiny regions need not apply πŸ™ˆ

πŸ’€ DESCRIPTION πŸ’€

so here's the tea β˜• this function sets the region of t exactly as requested by start and end. slay, straightforward, iconic.

but β€” and this is the fun part β€” if the values of start and end are both zero, it doesn't just sit there doing nothing. nope. it goes and finds 'System RAM' resources and sets the region to cover all the resources πŸ”₯ big "cover the whole map" energy, fr fr.

and in that latter case (the zero-zero situation), it saves the start and end addresses of the first and last resources into start and end, respectively ✨ so you get the real boundaries back through the same pointers you gave it. efficient. thoughtful. we love her πŸ’…


🌈 RETURN 🌈

  • 0 on success πŸŽ‰
  • a negative error code otherwise 😭 (not a vibe, but it happens)

🧚 SEE ALSO 🧚

Kernel file ./mm/damon/core.c:

go read them all, bestie, they're all linked ✨


aaaand that's the page! πŸŽ€ it lives in ./mm/damon from October 2026 β€” bookmark it, screenshot it, tell your friends πŸ’– periodt. πŸ¦‹

πŸ“¦ where this page comes from