]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.18] runtime: store consistent total allocation stats as uint64
authorMichael Anthony Knyszek <mknyszek@google.com>
Thu, 9 Jun 2022 18:25:01 +0000 (18:25 +0000)
committerHeschi Kreinick <heschi@google.com>
Wed, 6 Jul 2022 19:27:52 +0000 (19:27 +0000)
commitf0eca661ea69b107143c9619ec0d0df4829b5b7e
tree8e251f4b485b600a8ca2ba171154d8250faca79a
parent4068be56ce7721a3d75606ea986d11e9ca27077a
[release-branch.go1.18] runtime: store consistent total allocation stats as uint64

Currently the consistent total allocation stats are managed as uintptrs,
which means they can easily overflow on 32-bit systems. Fix this by
storing these stats as uint64s. This will cause some minor performance
degradation on 32-bit systems, but there really isn't a way around this,
and it affects the correctness of the metrics we export.

For #52680.
Fixes #52689.

Change-Id: I8b1926116e899ae9f03d58e0320bcb9264945b3e
Reviewed-on: https://go-review.googlesource.com/c/go/+/411495
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
src/runtime/mcache.go
src/runtime/metrics.go
src/runtime/mgcsweep.go
src/runtime/mstats.go