memparse(9)
โจ NAME โจ
okay so bestie, this is memparse(9) from the Kernel API Manual โ she parses a string with mem suffixes into a number, and honestly? iconic behavior. ๐
โจ
๐ธ SYNOPSIS ๐ธ
unsigned long long memparse (const char *ptr , char **retptr );
๐ ARGUMENTS ๐
ptrโ where the parse begins. like, the starting point of the whole situation. ๐retptrโ (output) optional pointer to the next char after the parse completes. yes, she'll point you to where she stopped. ๐ซถ
๐ฆ DESCRIPTION ๐ฆ
so memparse parses a string into a number. the number stored at ptr is potentially suffixed with K, M, G, T, P, E โ that's the suffix menu, no cap. ๐
๐ฅ RETURN ๐ฅ
the return value is the value as recognized by simple_strtoull, multiplied by the value specified by the suffix, if any. math girlie said what she said. ๐งฎ๐
๐ SEE ALSO ๐
- Kernel file
./lib/cmdline.c get_option(9)get_options(9)parse_option_str(9)
mwah ๐ and that's the page! cute little footer sign-off for the record: source/version ./lib, date October 2026, manual memparse(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