VM_MAP_DELETE(9)

πŸ’– VM_MAP_DELETE β€” kernel dev girlies, this one's for you πŸ’–

okay so bestie, welcome to section 9 of the Kernel Developer's Manual 🌸 this is the page for vm_map_delete, and it's giving extremely internal, do not touch unless you know what you're doing energy. no cap. let's get into it 🫢


✨ NAME ✨

vm_map_delete β€” deallocate an address range from a map πŸ—ΊοΈπŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

#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);

like, three headers, one function, zero drama. she's lowkey elegant 😌


🌈 DESCRIPTION 🌈

so vm_map_delete() deallocates the address range that's bounded by start and end, straight out of the map. that's it. that's the whole vibe. it takes that chunk of address space and it's gone πŸ’€βœ¨


πŸ”₯ IMPLEMENTATION NOTES πŸ”₯

listen. this function is for FreeBSD VM internal use only. i'm so serious.

if you're a FreeBSD VM consumer (hey bestie πŸ‘‹), the one you actually want is vm_map_remove(9). that's the main character. vm_map_delete() is backstage. do not put her on the red carpet πŸ™ˆ


⭐ RETURN VALUES ⭐

vm_map_delete() always returns KERN_SUCCESS. always. every single time. no surprises, no plot twists, she ate and left no crumbs πŸ‘‘


πŸŽ€ SEE ALSO πŸŽ€

go read those too, iykyk πŸ¦‹


πŸ’œ AUTHORS πŸ’œ

this manual page was written by Bruce M Simpson <bms@spc.org>. thank you king, we love a documented syscall 🫢🌸


and that's the whole page, bestie!! πŸ’– this one's from Debian, dated July 19, 2003 β€” yes she's an elder but she still slays ✨ mwah, go forth and not call this function directly unless you're literally the VM subsystem πŸ’…

πŸ“¦ where this page comes from