page_counter_memparse(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… page_counter_memparse(9)

okay so bestie, welcome to the kernel API manual β€” this one's living in section 9, and honestly it's giving "small but mighty" ✨

🌸 NAME 🌸

page_counter_memparse β€” literally memparse() but make it page counter limits πŸŽ€

✨ SYNOPSIS ✨

int page_counter_memparse (const char *buf , const char *max , unsigned
long *nr_pages );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • buf β€” the string you wanna parse, babes. that's the input, that's the vibe πŸ’…
  • max β€” a string that means the maximum possible value, iykyk πŸ‘‘
  • nr_pages β€” where the result comes back, in number of pages πŸ“„βœ¨

πŸ’– DESCRIPTION πŸ’–

so here's the tea: it returns -EINVAL, or 0 and nr_pages on success. that's it, that's the whole personality 🫢

and the way that nr_pages is limited to PAGE_COUNTER_MAX? iconic. it will not let you exceed that, periodt 🚫πŸ”₯

ngl bestie, always check that return value β€” -EINVAL means the parse did not slay πŸ’€

🌈 SEE ALSO 🌈


okay that's the whole page, go read the whole ./mm crew, they're all main character energy ⭐

πŸ¦‹ mwah, this one's from ./mm, dated October 2026 β€” catch you in the next manpage, bestie πŸ’œπŸŽ€

πŸ“¦ where this page comes from