count_highmem_image_pages(9)
π count_highmem_image_pages(9) β from the Kernel API Manual, bestie π
okay so picture this: it's a kernel API manual page, the title is count_highmem_image_pages(9), and honestly? she's serving. let's get into it β¨
β¨ NAME β¨
count_highmem_image_pages β literally just computes the number of highmem pages in the image. that's it. that's the whole gig π«Ά
πΈ SYNOPSIS πΈ
unsigned int count_highmem_image_pages (struct memory_bitmap *bm );
yes queen, she returns an unsigned int and she takes exactly one (1) pointer. no notes π
π¦ ARGUMENTS π¦
bmβ the memory bitmap π that's the whole argument. one little bitmap and she's off.
π DESCRIPTION π
so here's the vibe check: the bits in bm that correspond to image pages are assumed to be set. like, that's the deal going in. the function counts highmem pages in the image, and it's counting on you having already set those bits β no cap, no re-checking, she trusts you π₯
β οΈ fr fr, "assumed to be set" is doing a lot of work in that sentence. set your bits before you call her, bestie π
π SEE ALSO π
the whole friend group shows up for this one β it's giving group chat with 26 members and everyone's typing π«Ά and they all 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_free_highmem_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)prepare_highmem_image(9)copy_last_highmem_page(9)prepare_image(9)snapshot_write_next(9)restore_highmem(9)
okay that's the page!! π§ this iconic little drop comes to you from ./kernel/power, dated October 2026, and it's filed under count_highmem_image_pages(9). mwah π slay safe out there, and remember: set your bits π
π¦ 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