memory_bm_next_pfn(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… memory_bm_next_pfn(9) β€” the Kernel API Manual, bestie ✨

okay so welcome to the Kernel API Manual entry for memory_bm_next_pfn(9) β€” she's a little function with main character energy and she's literally about to walk you through a memory bitmap πŸ¦‹


🌸 NAME 🌸

memory_bm_next_pfn β€” find the next set bit in a memory bitmap. that's it, that's the whole vibe πŸ’…


✨ SYNOPSIS ✨

unsigned long memory_bm_next_pfn (struct memory_bitmap *bm );

like, she takes one pointer and gives you back an unsigned long. no cap 🫢


πŸŽ€ ARGUMENTS πŸŽ€

  • bm β€” the memory bitmap. your girl. the one you're scanning πŸ’–

πŸ¦‹ DESCRIPTION πŸ¦‹

so here's the tea πŸ“ β€” starting from the last returned position, this function searches for the next set bit in bm and returns the PFN that bit represents. it's giving "keep going where we left off" energy, and honestly? obsessed.

and if there are no more bits set? she doesn't ghost you, she just returns BM_END_OF_MAP. iconic behavior, very demure 😭

⚠️ real talk though: it is required to run memory_bm_position_reset before the first call to this function for the given memory bitmap. like, do not skip this step bestie, it's not optional, the vibes will be ruined πŸ™ˆ

πŸ”₯ SEE ALSO πŸ”₯

the whole friend group lives in the kernel file ./kernel/power/snapshot.c β€” say hi to all of them for me πŸ’œ


and that's the whole page, bestie πŸ’« this lil icon came from ./kernel/power, dated October 2026, and it's filed under memory_bm_next_pfn(9) β€” go forth and scan those bitmaps, iykyk πŸ‘‘πŸ’–

πŸ“¦ where this page comes from