Skip to main content

Module size

Module size 

Source
Expand description

Parsing for --memory-limit.

Strict on purpose: a malformed size is a usage error naming the accepted forms, never a silent fall back to the default. A user who typed 512MB and got 25% of RAM instead would have no way to notice.

Functionsยง

format_size
Renders a byte count the way a human reads it, for stuffr info.
parse_size
Parses 512, 512K, 512M, 2G (and lowercase) into bytes.