minimum_image_size(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 NAME 🌸

okay so bestie, this page is from the Kernel API Manual, and the main character is minimum_image_size β€” literally here to estimate the minimum acceptable size of an image. πŸ’…βœ¨

✨ SYNOPSIS ✨

unsigned long minimum_image_size (unsigned long saveable );

πŸŽ€ ARGUMENTS πŸŽ€

  • saveable β€” the number of saveable pages in the system. that’s the whole input, bestie 🫢

πŸ’– DESCRIPTION πŸ’–

so the vibe is: we do not want to be out here attempting to free too much memory too hard. 😭 instead, this function estimates the minimum acceptable size of a hibernation image, and that estimate is used as the lower limit for preallocating memory. iconic, honestly.

we assume that the minimum image size should be proportional to

[number of saveable pages] - [number of pages that can be freed in theory]

where that second term is the sum of:

  1. reclaimable slab pages
  2. active anonymous pages
  3. inactive anonymous pages
  4. active file pages
  5. inactive file pages

wait, let me say it cleaner: the second term is the sum of (1) reclaimable slab pages, (2) active and (3) inactive anonymous pages, (4) active and (5) inactive file pages. no cap. ✨

πŸ¦‹ SEE ALSO πŸ¦‹

kernel file ./kernel/power/snapshot.c β€” plus these functions, all listed exactly:


and that’s the whole page, bestie. this one lives under ./kernel/power, dated October 2026, and yes it’s still minimum_image_size(9) β€” mwah πŸ’‹πŸŽ€

πŸ“¦ where this page comes from