]> Cypherpunks repositories - gostls13.git/commit
runtime: don't hard-code physical page size
authorAustin Clements <austin@google.com>
Mon, 18 Jul 2016 16:24:02 +0000 (12:24 -0400)
committerAustin Clements <austin@google.com>
Tue, 6 Sep 2016 21:05:53 +0000 (21:05 +0000)
commit6dda7b2f5fb675a2747fea5ae020248245b8903f
tree77629c710cf45e34a80ed829b3e18eb151b8e3a7
parent276a52de55fb48c4e56a778f1f7cac9292d8fad7
runtime: don't hard-code physical page size

Now that the runtime fetches the true physical page size from the OS,
make the physical page size used by heap growth a variable instead of
a constant. This isn't used in any performance-critical paths, so it
shouldn't be an issue.

sys.PhysPageSize is also renamed to sys.DefaultPhysPageSize to make it
clear that it's not necessarily the true page size. There are no uses
of this constant any more, but we'll keep it around for now.

Updates #12480 and #10180.

Change-Id: I6c23b9df860db309c38c8287a703c53817754f03
Reviewed-on: https://go-review.googlesource.com/25022
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Rick Hudson <rlh@golang.org>
14 files changed:
src/runtime/internal/sys/arch_386.go
src/runtime/internal/sys/arch_amd64.go
src/runtime/internal/sys/arch_amd64p32.go
src/runtime/internal/sys/arch_arm.go
src/runtime/internal/sys/arch_arm64.go
src/runtime/internal/sys/arch_mips64.go
src/runtime/internal/sys/arch_mips64le.go
src/runtime/internal/sys/arch_ppc64.go
src/runtime/internal/sys/arch_ppc64le.go
src/runtime/internal/sys/arch_s390x.go
src/runtime/malloc.go
src/runtime/mbitmap.go
src/runtime/mem_linux.go
src/runtime/mheap.go