]> Cypherpunks repositories - gostls13.git/commit
runtime: add arenaBaseOffset on aix/ppc64
authorClément Chigot <chigot.c@gmail.com>
Wed, 13 Nov 2019 12:46:42 +0000 (13:46 +0100)
committerIan Lance Taylor <iant@golang.org>
Sat, 16 Nov 2019 00:02:02 +0000 (00:02 +0000)
commit5042317d6919d4c84557e04be35130430e8d1dd4
treedc59d2217baba82afd03c6bd1864e1d14337a56d
parent72f333a14b071e7560c67abcaacec176aaa604cf
runtime: add arenaBaseOffset on aix/ppc64

On AIX, addresses returned by mmap are between 0x0a00000000000000
and 0x0afffffffffffff. The previous solution to handle these large
addresses was to increase the arena size up to 60 bits addresses,
cf CL 138736.

However, with the new page allocator, the 60bit heap addresses are
causing huge memory allocations, especially by (s *pageAlloc).init. mmap
and munmap syscalls dealing with these allocations are reducing
performances of every Go programs.

In order to avoid these allocations, arenaBaseOffset is set to
0x0a00000000000000 and heap addresses are on 48bit, as others operating
systems.

Updates: #35451

Change-Id: Ice916b8578f76703428ec12a82024147a7592bc0
Reviewed-on: https://go-review.googlesource.com/c/go/+/206841
Run-TryBot: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
src/runtime/export_test.go
src/runtime/malloc.go