snapshot_additional_pages(9)
π snapshot_additional_pages(9) π
okay bestie, this page is straight out of the Kernel API Manual, and itβs all about one very specific estimate. Letβs get into it π«Άβ¨
β¨ NAME β¨
snapshot_additional_pages β Estimate the number of extra pages needed.
πΈ SYNOPSIS πΈ
unsigned int snapshot_additional_pages (struct zone *zone );
π ARGUMENTS π
zoneβ Memory zone to carry out the computation for.
π¦ DESCRIPTION π¦
okay so snapshot_additional_pages() estimates the number of additional pages needed for setting up a hibernation image data structures for zone β yes, thatβs the whole vibe, and it is an estimate, not a promise. Usually, the returned value is greater than the exact number, so itβs giving βestimate, not exactβ energy π
β¨.
no cap, thatβs literally the functionβs whole job here. π«Ά
π₯ SEE ALSO π₯
the kernel file ./kernel/power/snapshot.c, plus these iconic little references:
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)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)count_highmem_image_pages(9)prepare_highmem_image(9)copy_last_highmem_page(9)prepare_image(9)snapshot_write_next(9)restore_highmem(9)
okay thatβs the whole page, bestie π β it comes from ./kernel/power, dated October 2026, and honestly? iconic. π
π
π¦ 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