swsusp_free(9)
π swsusp_free(9) β a Kernel API Manual moment π
okay bestie, welcome to the swsusp_free(9) page, straight out of the Kernel API Manual β¨ this one's short but she's important, so pay attention π«Ά
πΈ NAME πΈ
swsusp_free β frees the pages that were allocated for the hibernation image. yes, the whole point. the girlies love a cleanup arc π
β¨ SYNOPSIS β¨
void swsusp_free (void );
π ARGUMENTS π
voidβ no arguments. literally none. she takes nothing and she needs nothing, main character energy π
π¦ DESCRIPTION π¦
so here's the tea π β image pages get allocated before snapshot creation happens. meaning they're already sitting there, taking up space, doing their little job. and then, after resume? they need to be released. that's it. that's the whole function. swsusp_free is the one who does the releasing π
no cap, it's not deep, but if you don't free them the memory just chills there forever and that's not the vibe π
π SEE ALSO π
the whole friend group, fr fr β every one of these shows up 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)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, the entire hibernation cinematic universe π§β¨ go read them, iykyk π
and that's the page!! π remember: allocated before the snapshot, freed after resume. that's the whole lore π
anyway bestie, this one's signed off from ./kernel/power, dated October 2026, page swsusp_free(9) β catch you on the next manpage ππΈπ¦
π¦ 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