PMAP_RESIDENT_COUNT(9)

πŸ’– PMAP_RESIDENT_COUNT β€” bestie edition πŸ’–

okay so you're here for pmap_resident_count and pmap_wired_count, two lil macros in the Kernel Developer's Manual section 9 that hand you page resident + wiring statistics. no cap. let's get into it 🫢


✨ NAME ✨

pmap_resident_count, pmap_wired_count β€” return page resident and wiring statistics

🌸 SYNOPSIS 🌸

#include <sys/param.h>
#include <vm/vm.h>
#include <vm/pmap.h>

long
pmap_resident_count(pmap_t pmap);

long
pmap_wired_count(pmap_t pmap);

πŸ’… DESCRIPTION πŸ’…

okay so here's the tea, bestie: the pmap_resident_count() and pmap_wired_count() macros exist so that pmap consumers can retrieve statistics from the pm_stats member of the machine-dependent structure struct pmap. that's it, that's the whole vibe. the way they just let you peek at the stats?? iconic. πŸ”₯

🧚 IMPLEMENTATION NOTES 🧚

Both of these are defined as in-line macros β€” not full-on functions, just little macros doing their thing ✨

And the members they access? Type long. periodt.

⭐ RETURN VALUES ⭐

  • pmap_resident_count() returns the number of pages in the physical map pmap which are currently resident in main memory πŸ’–
  • pmap_wired_count() returns the number of pages in the physical map pmap which are currently wired into in main memory 🌈

πŸ‘‘ SEE ALSO πŸ‘‘

πŸŽ€ AUTHORS πŸŽ€

This manual page was written by Bruce M Simpson <bms@spc.org>. thank you for your service king πŸ«‘πŸ’œ


and that's the whole page, bestie πŸ’… this one shipped with Debian and is dated July 21, 2003 β€” yeah, it's old enough to have its own nostalgic tumblr era, but the info still slaps ✨ go read pmap(9) next, iykyk πŸ¦‹πŸ“

πŸ“¦ where this page comes from