mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
runtime: add byte count parser for GOMEMLIMIT
This change adds a parser for the GOMEMLIMIT environment variable's input. This environment variable accepts a number followed by an optional prefix expressing the unit. Acceptable units include B, KiB, MiB, GiB, TiB, where *iB is a power-of-two byte unit. For #48409. Change-Id: I6a3b4c02b175bfcf9c4debee6118cf5dda93bb6f Reviewed-on: https://go-review.googlesource.com/c/go/+/393400 TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Michael Pratt <mpratt@google.com> Run-TryBot: Michael Knyszek <mknyszek@google.com>
This commit is contained in:
parent
01359b4681
commit
0feebe6eb5
3 changed files with 229 additions and 12 deletions
|
|
@ -33,6 +33,7 @@ var Fastlog2 = fastlog2
|
|||
|
||||
var Atoi = atoi
|
||||
var Atoi32 = atoi32
|
||||
var ParseByteCount = parseByteCount
|
||||
|
||||
var Nanotime = nanotime
|
||||
var NetpollBreak = netpollBreak
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue