UVM_KM_SUBALLOC(9)
π UVM_KM_SUBALLOC(9) π
okay so bestie, welcome to uvm_km_suballoc β that's section 9 of the Kernel Developer's Manual, the part where we talk about raw kernel memory or address space allocator energy. yes, raw. yes, kernel. no cap, this one's a lil niche but she's iconic if you know what she's doing π§β¨
β¨ SYNOPSIS β¨
like, first you gotta pull in the headers or she won't even look at you:
#include <sys/param.h>
#include <uvm/uvm.h>
and then the main character herself:
uvm_km_suballoc(vm_map_t map, vaddr_t *min, vaddr_t *max, vsize_t size,
int flags, boolean_t fixed, vm_map_t submap);
literally copy that exactly, don't be creative with it π
π¦ DESCRIPTION π¦
okay so here's the tea π β uvm_km_suballoc() allocates submap (with the specified flags, as described above β yes bestie, "as described above", the page said it, I'm just passing the message along π«Ά) from map, and it'll create a brand new map for you if submap is NULL. so generous of her honestly π
you can also pin down the addresses of the submap exactly β just set the fixed argument to non-zero, and that makes the min argument specify the beginning of the address in the submap. precise. intentional. main character energy π
but if fixed is zero? then it's a whole different vibe β any address of size size will be allocated from map, and the start and end addresses come back to you in min and max. she picks, you receive. slay π
ngl, thefixedflag is the whole personality switch here β non-zero means you choose the starting address viamin, zero means the allocator gets to choose and hands youmin+maxback. don't mix that up, bestie π
π SEE ALSO π
km_alloc(9)β go read her too, fr fr
and that's the whole page, bestie β no filler, no skips, every detail intact π this lil moment was brought to you by Debian, dated November 13, 2025 π and the page header? that's UVM_KM_SUBALLOC(9), section 9 of the Kernel Developer's Manual, in case you forgot already π mwah, go allocate something responsibly βπ₯
π¦ where this page comes from
- nixpkgs unstable: cvs-export
- Copyright (c) 1998 Matthew R. Green
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms