VM_MAP_REMOVE(9)

πŸ’– VM_MAP_REMOVE β€” the kernel dev manual, bestie edition πŸ’–

okay so this is VM_MAP_REMOVE(9), from the Kernel Developer's Manual, and it's giving "I delete things and I'm chill about it." Let's get into it ✨


🌸 NAME 🌸

vm_map_remove β€” remove a virtual address range from a map

Like, literally. Range in, range gone. No cap. πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

#include <sys/param.h>
#include <vm/vm.h>
#include <vm/vm_map.h>

int
vm_map_remove(vm_map_t map, vm_offset_t start, vm_offset_t end);

Three headers, one function, zero drama. She's low maintenance fr fr 🫢


πŸ¦‹ DESCRIPTION πŸ¦‹

The vm_map_remove() function removes the given address range bounded by start and end from the target map.

That's it. That's the whole vibe. You hand her a map and two boundaries and she takes that slice of address space OUT. Bye. Gone. Not me being emotional about a memory range 😭


πŸ‘‘ IMPLEMENTATION NOTES πŸ‘‘

  • This is the exported form of vm_map_delete(9), which may be called by consumers of the VM subsystem. So like, vm_map_delete(9) is the backstage version and vm_map_remove() is the one with main character energy that everyone else gets to talk to. ✨
  • The function calls vm_map_lock(9) to hold a lock on map for the duration of the function call. She locks the door, does her thing, and nobody's getting in mid-glow-up. πŸ”’πŸ’…

⭐ RETURN VALUES ⭐

The vm_map_remove() always returns KERN_SUCCESS.

Always. Not "usually", not "most of the time", not "depends on your moon sign". ALWAYS. She ate and left no crumbs, and there are no crumbs to report. πŸ”₯


🌈 SEE ALSO 🌈

Go read those too bestie, iykyk 🧚


πŸ’œ AUTHORS πŸ’œ

This manual page was written by Bruce M Simpson <bms@spc.org>. Iconic behavior, we love to see it πŸ’–


and that's the whole page!! ty for coming to my ted talk πŸŽ€

this one came out of the Debian crew, dated July 19, 2003 β€” yeah she's an elder but she's still slaying, respect the classics πŸ‘‘βœ¨

πŸ“¦ where this page comes from