STRUCT VMEM_ALTMAP(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– struct vmem_altmap(9) πŸ’–

okay bestie, welcome to the Kernel API Manual page for struct vmem_altmap β€” it's giving pre-allocated storage for vmemmap_populate, and we're keeping every last field. no cap. ✨


🌸 NAME 🌸

struct vmem_altmap β€” literally pre-allocated storage for vmemmap_populate. that's the whole name and the whole vibe, slay 🫢


πŸ¦‹ SYNOPSIS πŸ¦‹

       struct vmem_altmap {
           unsigned long base_pfn;
           const unsigned long end_pfn;
           const unsigned long reserve;
           unsigned long free;
           unsigned long align;
           unsigned long alloc;
        };

πŸŽ€ Members πŸŽ€

  • base_pfn β€” base of the entire dev_pagemap mapping. like, the starting point, iykyk.
  • reserve β€” pages mapped, but reserved for driver use (relative to base). mapped but set aside for the driver, bestie.
  • free β€” free pages set aside in the mapping for memmap storage. the set-aside girlies πŸ’…
  • align β€” pages reserved to meet allocation alignments. alignment matters, fr fr.
  • alloc β€” track pages consumed, private to vmemmap_populate. private means private β€” not for the group chat πŸ™ˆ

also end_pfn is right there in the struct β€” this page just doesn't give it its own member line, and I'm not out here inventing facts πŸ’€


🌈 SEE ALSO 🌈

  • Kernel file ./include/linux/memremap.h
  • struct dev_pagemap(9)

mwah πŸ’‹ β€” this page is from ./include/linux, October 2026. byeee 🫢

πŸ“¦ where this page comes from