PMAP_RESIDENT_COUNT(9)
π PMAP_RESIDENT_COUNT(9) β the kernel dev manual, but make it cute π
okay so bestie, you're in the Kernel Developer's Manual section (that's the 9 in the name, iykyk) and we're talking about pmap_resident_count and pmap_wired_count. These two are literally the β¨statistics girliesβ¨ of the pmap world β they hand you back page resident stats and wiring stats, no cap.
πΈ NAME πΈ
pmap_resident_count, pmap_wired_count β return page resident and wiring statistics π
β¨ SYNOPSIS β¨
first you gotta pull in the headers, like actual required, not optional:
#include <sys/param.h>
#include <vm/vm.h>
#include <vm/pmap.h>
then the two functions, exactly like this:
long
pmap_resident_count(pmap_t pmap);
long
pmap_wired_count(pmap_t pmap);
both return long, both take a pmap_t pmap. slay. π
π¦ DESCRIPTION π¦
so the pmap_resident_count() and pmap_wired_count() macros are what let pmap consumers retrieve statistics from the pm_stats member of the machine-dependent structure struct pmap. that's the whole vibe β you want stats, they give you stats. main character energy fr fr. π
π§ IMPLEMENTATION NOTES π§
okay important detail, don't miss this: both functions are defined as in-line macros. and the members which they access have type long. literally, the members they touch are long. keep that in mind π«Ά
π RETURN VALUES π
- The
pmap_resident_count()returns the number of pages in the physical map pmap which are currently resident in main memory. - The
pmap_wired_count()returns the number of pages in the physical map pmap which are currently wired into in main memory.
one counts resident pages, one counts wired pages, both in the physical map pmap, both in main memory. iconic behavior honestly. π
π₯ SEE ALSO π₯
go read that one too, bestie, it's the whole pmap situation and it's giving essential lore. π
πΈ AUTHORS πΈ
This manual page was written by Bruce M Simpson <bms@spc.org>. π«Ά
lowkey a reminder that this is kernel developer territory β nothing mean here, just facts, but like... facts that matter if you're poking at pmaps. π
and that's the page!! π
it's from the Debian source, dated July 21, 2003, and the whole thing lives under the PMAP_RESIDENT_COUNT(9) header β periodt, go count some pages bestie πβ¨π¦
π¦ 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