pfn_valid(9)
β¨ pfn_valid β¨
okay so bestie, this is a kernel API manual page and we're about to get so into it π
πΈ NAME πΈ
pfn_valid β check if there is a valid memory map entry for a PFN
π¦ SYNOPSIS π¦
int pfn_valid (unsigned long pfn );
π ARGUMENTS π
pfnβ the page frame number to check, like the scrunchie you're looking for in your bag π
π DESCRIPTION π
So basically, this function checks if there is a valid memory map entry β aka a struct page β for the pfn. it's giving "do you have a valid ID" energy at the kernel club πͺͺβ¨
β οΈ but bestie, listen: just because the memory map entry exists does not mean there's actual usable memory at thatpfn. thestruct pagemight be representing a hole or an unusable page frame. so likeβ¦ it's valid but it's not valid valid, y'know? no cap, this is important π
π₯ RETURN π₯
1 for PFNs that have memory map entries, and 0 otherwise. periodt. π―
π SEE ALSO π
The kernel file ./include/linux/mmzone.h is the main character here, and the squad includes:
is_highmem(9)for_each_online_pgdat(9)for_each_zone(9)next_zones_zonelist(9)first_zones_zonelist(9)for_each_zone_zonelist_nodemask(9)for_each_zone_zonelist(9)
okay that's the whole vibe bestie, hope you slayed this and understood it fr fr πβ¨
catch you in the ./include/linux directory, October 2026 edition, version pfn_valid(9) π«Άπ
π¦ 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