1MEMPARSE(9)             Basic Kernel Library Functions             MEMPARSE(9)
2
3
4

NAME

6       memparse - parse a string with mem suffixes into a number
7

SYNOPSIS

9       unsigned long long memparse(const char * ptr, char ** retptr);
10

ARGUMENTS

12       ptr
13           Where parse begins
14
15       retptr
16           (output) Optional pointer to next char after parse completes
17

DESCRIPTION

19       Parses a string into a number. The number stored at ptr is potentially
20       suffixed with K (for kilobytes, or 1024 bytes), M (for megabytes, or
21       1048576 bytes), or G (for gigabytes, or 1073741824). If the number is
22       suffixed with K, M, or G, then the return value is the number
23       multiplied by one kilobyte, one megabyte, or one gigabyte,
24       respectively.
25
27Kernel Hackers Manual 2.6.         June 2019                       MEMPARSE(9)
Impressum