]> Cypherpunks repositories - gostls13.git/commit
runtime: make mheap.pagesInUse an atomic.Uintptr
authorMichael Anthony Knyszek <mknyszek@google.com>
Wed, 7 Sep 2022 20:14:46 +0000 (20:14 +0000)
committerGopher Robot <gobot@golang.org>
Thu, 8 Sep 2022 16:06:01 +0000 (16:06 +0000)
commit5a379654952f8103d801cbccb5112c3e9976b104
tree5dda254a14b22f06ff16fb9a852f9905dfdf95e5
parente28cc362a825b297fa8a10dc95d7c0d2e2b21dfc
runtime: make mheap.pagesInUse an atomic.Uintptr

This change fixes an old TODO that made it a uint64 because it would
make alignment within mheap more complicated. Now that we don't have to
worry about it since we're using atomic types as much as possible,
switch to using a Uintptr. This likely will improve performance a tiny
bit on 32-bit platforms, but really it's mostly cleanup.

Change-Id: Ie705799a111ccad977fc1f43de8b50cf611be303
Reviewed-on: https://go-review.googlesource.com/c/go/+/429221
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
Auto-Submit: Michael Knyszek <mknyszek@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Michael Knyszek <mknyszek@google.com>
src/runtime/mheap.go