]> Cypherpunks repositories - gostls13.git/commit
runtime: use offAddr in more parts of the runtime
authorMichael Anthony Knyszek <mknyszek@google.com>
Tue, 28 Apr 2020 21:30:57 +0000 (21:30 +0000)
committerMichael Knyszek <mknyszek@google.com>
Fri, 8 May 2020 16:32:03 +0000 (16:32 +0000)
commitea5f9b666ccf7affca596be3ab0dc523ca4444fb
tree5fa08a27635a5d1a65384d071c16229c4fd200c8
parentd69509ff995bf3b92246365980e3d27eaf720e6a
runtime: use offAddr in more parts of the runtime

This change uses the new offAddr type in more parts of the runtime where
we've been implicitly switching from the default address space to a
contiguous view. The purpose of offAddr is to represent addresses in the
contiguous view of the address space, and to make direct computations
between real addresses and offset addresses impossible. This change thus
improves readability in the runtime.

Updates #35788.

Change-Id: I4e1c5fed3ed68aa12f49a42b82eb3f46aba82fc1
Reviewed-on: https://go-review.googlesource.com/c/go/+/230718
Run-TryBot: Michael Knyszek <mknyszek@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
src/runtime/mgcscavenge.go
src/runtime/mpagealloc.go
src/runtime/mpagecache.go
src/runtime/mranges.go