VM_MAP_MADVISE(9)
π vm_map_madvise β apply advice about use of memory to map entries
Okay so bestie, this one is from the Kernel Developerβs Manual, section 9, and itβs literally the function that applies advice about how memory is used to map entries. Very βIβm the helper your kernel callsβ energy. β¨
πΈ NAME πΈ
vm_map_madvise β apply advice about use of memory to map entries
π SYNOPSIS π
#include <sys/param.h>
#include <vm/vm.h>
#include <vm/vm_map.h>
int
vm_map_madvise(vm_map_t map, vm_offset_t start, vm_offset_t end,
int behav);
π¦ DESCRIPTION π¦
So like, vm_map_madvise() takes the flags in behav and applies them to the entries inside map between start and end. Thatβs the whole vibe. π
Advisories are classified as either those affecting the vm_map_entry structure, or those affecting the underlying objects. Both categories are a thing, and the function is aware of the difference. No cap.
Also important: vm_map_madvise() is used by the madvise(2) system call. So when that syscall is out here giving advice, this function is lowkey doing the map-entry part of the work. π«Ά
β RETURN VALUES β
vm_map_madvise() returns 0 if successful. Slay.
If the behav argument was not recognised, KERN_INVALID_ARGUMENT is returned. Thatβs the βbestie, I donβt know this flagβ outcome. π
π SEE ALSO π
π AUTHORS π
This manual page was written by Bruce M Simpson <bms@spc.org>. Iconic behavior, honestly. π
And thatβs the page, bestie β this copy came from Debian, dated July 19, 2003. Historical cuteness, preserved. π
π¦ 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