VM_MAP_INSERT(9)
π VM_MAP_INSERT(9) β¨
okay bestie, this is straight from the Kernel Developer's Manual, and it's the entry for vm_map_insert β the function that inserts an object into a map. no cap, it's giving kernel-internals main character energy π«Ά
πΈ NAME πΈ
vm_map_insert β insert an object into a map
β¨ SYNOPSIS β¨
#include <sys/param.h>
#include <vm/vm.h>
#include <vm/vm_map.h>
int
vm_map_insert(vm_map_t map, vm_object_t object, vm_ooffset_t offset,
vm_offset_t start, vm_offset_t end, vm_prot_t prot, vm_prot_t max,
int cow);
π DESCRIPTION π
The vm_map_insert() function inserts a mapping for the entire vm_object object into the target map β yes, the variable is literally named map, iykyk π
The offset argument specifies the offset into the object at which to begin mapping. The object's size should match that of the specified address range β keep that energy aligned, bestie π«Ά
The start and end arguments specify the bounds of the mapped object's window in the address space of map.
The cow argument specifies the flags which should be propagated to the new entry, for example, to indicate that this is a copy-on-write mapping. Also, the signature carries prot and max, both vm_prot_t β keep them exactly as shown in the synopsis. β¨
π§ IMPLEMENTATION NOTES π§
This function implicitly creates a new vm_map_entry by calling the internal function vm_map_entry_create(). so it's giving delegation, not DIY π§
π RETURN VALUES π
The vm_map_insert() function returns KERN_SUCCESS if the mapping could be made successfully. π
Otherwise, it's one of these:
KERN_INVALID_ADDRESSβ returned if the start of the range could not be found.KERN_NO_SPACEβ returned if the range was found to be part of an existing entry or if it overlaps the end of the map.
π¦ SEE ALSO π¦
π AUTHORS π
This manual page was written by Bruce M Simpson <bms@spc.org>. ty for your service, king π
k byeee π
β source/version: Debian, date: January 11, 2013, page: VM_MAP_INSERT(9). mwah π
π¦ where this page comes from
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- nixpkgs unstable: source
- Copyright (c) 2003 Bruce M Simpson <bms@spc.org>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms