]> Cypherpunks repositories - gostls13.git/commit
runtime: copy in MemStats fields explicitly
authorMichael Anthony Knyszek <mknyszek@google.com>
Fri, 31 Jul 2020 21:32:26 +0000 (21:32 +0000)
committerMichael Knyszek <mknyszek@google.com>
Mon, 26 Oct 2020 18:09:52 +0000 (18:09 +0000)
commit39e335ac0618044bbd8ed2fca5e5b3583d8c444e
tree7d0313dea4ae3fde47778b6f1daec5ce54e5bf1e
parent8ebc58452af3a586a3da1f68725bc83c78d4b073
runtime: copy in MemStats fields explicitly

Currently MemStats is populated via an unsafe memmove from memstats, but
this places unnecessary structural restrictions on memstats, is annoying
to reason about, and tightly couples the two. Instead, just populate the
fields of MemStats explicitly.

Change-Id: I96f6a64326b1a91d4084e7b30169a4bbe6a331f9
Reviewed-on: https://go-review.googlesource.com/c/go/+/246972
Run-TryBot: Michael Knyszek <mknyszek@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Trust: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
src/runtime/mstats.go