runtime: clarify address space limit constants and comments

Now that we support the full non-contiguous virtual address space of
amd64 hardware, some of the comments and constants related to this are
out of date.

This renames memLimitBits to heapAddrBits because 1<<memLimitBits is
no longer the limit of the address space and rewrites the comment to
focus first on hardware limits (which span OSes) and then discuss
kernel limits.

Second, this eliminates the memLimit constant because there's no
longer a meaningful "highest possible heap pointer value" on amd64.

Updates #23862.

Change-Id: I44b32033d2deb6b69248fb8dda14fc0e65c47f11
Reviewed-on: https://go-review.googlesource.com/95498
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Rick Hudson <rlh@golang.org>
This commit is contained in:
Austin Clements 2018-02-20 11:59:02 -05:00
parent ed1959c6e6
commit ea8d7a370d
5 changed files with 41 additions and 30 deletions

View file

@ -144,7 +144,7 @@ var stackpoolmu mutex
// Global pool of large stack spans.
var stackLarge struct {
lock mutex
free [memLimitBits - pageShift]mSpanList // free lists by log_2(s.npages)
free [heapAddrBits - pageShift]mSpanList // free lists by log_2(s.npages)
}
func stackinit() {