crash_exclude_mem_range(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 NAME 🌸

okay so bestie, welcome to crash_exclude_mem_range(9) from the Kernel API Manual πŸ’– this one is literally about excluding a mem range for existing ranges. that's the whole vibe, no cap.

✨ SYNOPSIS ✨

int crash_exclude_mem_range (struct crash_mem *mem , unsigned long long
mstart , unsigned long long mend );

πŸŽ€ ARGUMENTS πŸŽ€

  • mem β€” mem->range contains an array of ranges sorted in ascending order. slay, we love an ordered array ✨
  • mstart β€” the start of to-be-excluded range.
  • mend β€” the start of to-be-excluded range. (yes bestie, the page says β€œstart” again here β€” not me inventing anything, just copying it exactly πŸ’…)

πŸ¦‹ DESCRIPTION πŸ¦‹

ok so if you are unsure if a range split will happen, and you want to avoid the function call failing because of -ENOMEM, always make sure mem->max_nr_ranges == mem->nr_ranges + 1 before calling the function each time. like, every single time, no cap πŸ”₯

It returns 0 if a memory range is excluded successfully. It returns -ENOMEM if mem->ranges doesn’t have space to hold split ranges 😭 that’s the failure vibe, okay?

πŸ”₯ SEE ALSO πŸ”₯

  • Kernel file ./kernel/crash_core.c

cute little sign-off: this page is from ./kernel, in the Kernel API Manual, dated October 2026. byeee πŸ«ΆπŸ’œπŸŽ€

πŸ“¦ where this page comes from