count_free_highmem_pages(9)
π count_free_highmem_pages(9) π
okay so bestie, welcome to the Kernel API Manual entry for count_free_highmem_pages β yes that's a whole mouthful and yes it's exactly as iconic as it sounds π«Ά
β¨ NAME β¨
count_free_highmem_pages β literally computes the total number of free highmem pages π
no cap, that's the whole job
πΈ SYNOPSIS πΈ
unsigned int count_free_highmem_pages (void );
that's it. that's the whole call. she takes nothing, she gives you an unsigned int π
π ARGUMENTS π
voidβ no arguments. not a single one. she doesn't need them, she's booked and busy on her own π
π¦ DESCRIPTION π¦
so the number she hands back? it's system-wide β like, the whole system, not just your little corner of it. main character energy fr fr π
β SEE ALSO β
okay gather round, because the friend group here is huge and every single one of them is invited to the group chat π
kicking it off, all of these live in the kernel file ./kernel/power/snapshot.c:
get_image_page(9)free_image_page(9)alloc_rtree_node(9)free_mem_extents(9)create_mem_extents(9)memory_bm_next_pfn(9)mark_nosave_pages(9)create_basic_memory_bitmaps(9)free_basic_memory_bitmaps(9)snapshot_additional_pages(9)count_highmem_pages(9)count_data_pages(9)swsusp_free(9)preallocate_image_pages(9)free_unnecessary_pages(9)minimum_image_size(9)hibernate_preallocate_memory(9)pack_pfns(9)snapshot_read_next(9)unpack_orig_pfns(9)count_highmem_image_pages(9)prepare_highmem_image(9)copy_last_highmem_page(9)prepare_image(9)snapshot_write_next(9)restore_highmem(9)
like I said. huge friend group. all of them linked, all of them slay π₯
ngl if you're poking around hibernation/snapshot code, this is your people. go say hi π
and that's the vibe check bestie β this one came out of ./kernel/power back in October 2026, so big ups to the source and that date π mwah, periodt π
π
π¦ 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