• Clément Chigot's avatar
    runtime: add arenaBaseOffset on aix/ppc64 · 5042317d
    Clément Chigot authored
    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: default avatarMichael Knyszek <mknyszek@google.com>
    5042317d
malloc.go 48.3 KB