VM_MAP_DELETE(9)

πŸ“¦ version 15.1, in freebsd 14.5, freebsd 15.1, nixpkgs unstable

πŸ’… VM_MAP_DELETE β€” the 9 girlies' kernel developer manual ✨

okay so bestie, you found yourself a Kernel Developer's Manual page (that's the 9 section, iykyk) and it's all about vm_map_delete. Buckle up, it's short but it EATS πŸ“


πŸ’– NAME πŸ’–

vm_map_delete β€” deallocates an address range from a map

Like, it takes a chunk of address space and just... yeets it. Gone. Free real estate. 🫢


✨ SYNOPSIS ✨

the vibes, verbatim:

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

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

three includes, one function, zero drama. we love a low-maintenance icon πŸ‘‘


🌸 DESCRIPTION 🌸

okay so vm_map_delete() deallocates the address range bounded by start and end, and it does it from map. that's the whole thing. it takes the range, and it's like "not yours anymore bestie πŸ’…".

literally the entire description. the manpage said what it said and then it stopped. iconic behaviour honestly.


πŸŽ€ IMPLEMENTATION NOTES πŸŽ€

so here's the thing, and I need you to really hear me on this one:

this function is for FreeBSD VM internal use only. it's giving "staff only" door, no cap.

if you're a FreeBSD VM consumer (hi, that's you, the person reading this), you should be calling vm_map_remove(9) instead. like, that's the one for you. vm_map_delete is not your main character, it's a backstage pass situation πŸ™ˆ


⭐ RETURN VALUES ⭐

the vm_map_delete() function always returns KERN_SUCCESS. always. every time. it does not miss. it does not have a bad day. KERN_SUCCESS and nothing else, fr fr πŸ”₯


πŸ¦‹ SEE ALSO πŸ¦‹


πŸ‘‘ AUTHORS πŸ‘‘

this manual page was written by Bruce M Simpson <bms@spc.org>. thank you for your service πŸ«‘πŸ’œ


okay that's the whole page, you're all caught up πŸ’– this one came from Debian, dated July 19, 2003 β€” yeah she's a vintage, she's a classic, she's been serving since before some of us could read. mwah πŸŽ€βœ¨

now go call vm_map_remove(9) like a good VM consumer πŸ§šβ€β™€οΈ

πŸ“¦ where this page comes from