page_counter_memparse(9)
π 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 π
- Kernel file
./mm/page_counter.c page_counter_cancel(9)page_counter_charge(9)page_counter_try_charge(9)page_counter_uncharge(9)page_counter_set_max(9)page_counter_set_min(9)page_counter_set_low(9)page_counter_calculate_protection(9)
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
- 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