nr_free_zone_pages(9)
π nr_free_zone_pages(9) π
okay so you found the kernel API manual, bestie β welcome to nr_free_zone_pages, straight out of the Kernel API Manual. she counts pages that live beyond the high watermark, and honestly? iconic behavior. let's get into it π«Ά
β¨ SYNOPSIS β¨
unsigned long nr_free_zone_pages (int offset );
that's it. one arg. one unsigned long coming back at you. we love a simple signature, no cap π
πΈ ARGUMENTS πΈ
offsetβ the zone index of the highest zone. like, the top of the range she's gonna walk, iykyk π¦
π DESCRIPTION π
so here's the vibe: nr_free_zone_pages counts the number of pages that are beyond the high watermark within all zones at or below a given zone index. every zone at or under offset, she's checking it. thorough queen π
for each zone, the number of pages is calculated as:
nr_free_zone_pages = managed_pages - high_pages
literally that's the whole formula. managed_pages minus high_pages, per zone. math ate and left no crumbs β¨
β RETURN β
number of pages beyond high watermark. that's the whole return value, fr fr π
π SEE ALSO π
bestie there are so many friends in this friend group, buckle up:
- Kernel file
./mm/page_alloc.cβ that's where the family lives π __get_pfnblock_flags_mask(9)get_pfnblock_bit(9)get_pfnblock_migratetype(9)__set_pfnblock_flags_mask(9)set_pfnblock_bit(9)clear_pfnblock_bit(9)set_pageblock_migratetype(9)__move_freepages_block_isolate(9)__putback_isolated_page(9)__free_pages(9)free_pages(9)alloc_pages_exact(9)alloc_pages_exact_nid(9)free_pages_exact(9)nr_free_buffer_pages(9)find_next_best_node(9)free_reserved_pages(9)setup_per_zone_wmarks(9)__free_contig_range(9)alloc_contig_frozen_range(9)alloc_contig_range(9)alloc_contig_frozen_pages(9)alloc_contig_pages(9)free_contig_frozen_range(9)free_contig_range(9)alloc_pages_nolock(9)
like I said. big friend group. go say hi π
ngl this page is short and sweet β no gotchas, no deprecation drama, no scary undefined behavior. just a page counter doing her thing. slay π§
and that's the whole page, bestie!! this one came from the ./mm corner of the tree, dated October 2026, and the header up top says nr_free_zone_pages(9) in the Kernel API Manual β so you know exactly where to find her again π
β¨ see you in the next manpage, mwah π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms