VM_MAP_FINDSPACE(9)
β¨ vm_map_findspace β bestie edition β¨
okay so we're in the Kernel Developer's Manual, section 9, and today's main character is vm_map_findspace. she finds free space in a map. that's her whole thing and she's iconic for it π
πΈ NAME πΈ
vm_map_findspace β find a free region within a map
β¨ SYNOPSIS β¨
#include <sys/param.h>
#include <vm/vm.h>
#include <vm/vm_map.h>
int
vm_map_findspace(vm_map_t map, vm_offset_t start, vm_size_t length,
vm_offset_t *addr);
π DESCRIPTION π
so vm_map_findspace() is literally out here trying to find a region in the map that has enough room for an object of size length at the address addr. that's the vibe. that's the mission. no cap. π¦
π IMPLEMENTATION NOTES π
okay bestie, listen, this part is important so don't scroll past it π
it is the caller's responsibility to obtain a lock on the map using vm_map_lock(9) before calling this function. yes, you. the lock is your problem, not hers. handle it. π
also, this routine may call pmap_growkernel(9) to grow the kernel's address space β but only if and only if the mapping is being made within the kernel address space, and if insufficient space remains in the kernel_map. both conditions, no shortcuts. that's it, that's the rule. β
π RETURN VALUES π
- returns the value
0if successful β and in that happy little case,*addrwill contain the first virtual address in the found region π₯³ - otherwise, the value
1is returned π
periodt. that's the whole return situation.
π«Ά SEE ALSO π«Ά
π AUTHORS π
this manual page was written by Bruce M Simpson <bms@spc.org>. king behavior, honestly. π
and that's the whole page, bestie!! this was the Debian build of VM_MAP_FINDSPACE(9), dated July 19, 2003 β yeah she's vintage, she's a classic, we love her for it. mwah πβ¨
π¦ where this page comes from
- debian bookworm: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- debian trixie: freebsd-manpages 12.2-2 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu jammy: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu noble: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu questing: freebsd-manpages 12.2-2
- ubuntu resolute: freebsd-manpages 12.2-2build1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu stonking: freebsd-manpages 12.2-2build1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- Copyright (c) 2003 Bruce M Simpson <bms@spc.org>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms