]> Cypherpunks repositories - gostls13.git/commit
runtime: SysMap uses MAP_FIXED if needed on 64-bit Linux
authorJonathan Mark <jhmark@xenops.com>
Wed, 8 Jun 2011 04:50:10 +0000 (21:50 -0700)
committerIan Lance Taylor <iant@golang.org>
Wed, 8 Jun 2011 04:50:10 +0000 (21:50 -0700)
commitddde52ae5612706cb529b964dd3a27adb3e0ae0b
tree600cdd41932259547e72b3df189fe19d19549cb8
parentbac24da2acec0fc3a6ef4c0243ac103e7a031de9
runtime: SysMap uses MAP_FIXED if needed on 64-bit Linux

This change was adapted from gccgo's libgo/runtime/mem.c at
Ian Taylor's suggestion.  It fixes all.bash failing with
"address space conflict: map() =" on amd64 Linux with kernel
version 2.6.32.8-grsec-2.1.14-modsign-xeon-64.
With this change, SysMap will use MAP_FIXED to allocate its desired
address space, after first calling mincore to check that there is
nothing else mapped there.

R=iant, dave, n13m3y3r, rsc
CC=golang-dev
https://golang.org/cl/4438091
src/pkg/runtime/linux/386/sys.s
src/pkg/runtime/linux/amd64/sys.s
src/pkg/runtime/linux/arm/sys.s
src/pkg/runtime/linux/mem.c
src/pkg/runtime/runtime.h