diff options
author | Keith Randall <khr@golang.org> | 2015-02-23 13:58:05 -0800 |
---|---|---|
committer | Keith Randall <khr@golang.org> | 2015-02-25 21:16:18 +0000 |
commit | 7e1b61c71840386a494a0a9f99cb7237112c1116 (patch) | |
tree | 31ddf6ddb37801ab1c6465a369355c711e433dc1 /src/runtime/defs_linux_ppc64le.go | |
parent | 6d1ebeb5271a06cd55f55a84e95709e2f4805bcc (diff) | |
download | go-git-7e1b61c71840386a494a0a9f99cb7237112c1116.tar.gz |
runtime: mark pages we return to kernel as NOHUGEPAGE
We return memory to the kernel with madvise(..., DONTNEED).
Also mark returned memory with NOHUGEPAGE to keep the kernel from
merging this memory into a huge page, effectively reallocating it.
Only known to be a problem on linux/{386,amd64,amd64p32} at the moment.
It may come up on other os/arch combinations in the future.
Fixes #8832
Change-Id: Ifffc6627a0296926e3f189a8a9b6e4bdb54c79eb
Reviewed-on: https://go-review.googlesource.com/5660
Reviewed-by: Dmitry Vyukov <dvyukov@google.com>
Diffstat (limited to 'src/runtime/defs_linux_ppc64le.go')
-rw-r--r-- | src/runtime/defs_linux_ppc64le.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/runtime/defs_linux_ppc64le.go b/src/runtime/defs_linux_ppc64le.go index f90b84874b..317a764a70 100644 --- a/src/runtime/defs_linux_ppc64le.go +++ b/src/runtime/defs_linux_ppc64le.go @@ -17,7 +17,9 @@ const ( _MAP_PRIVATE = 0x2 _MAP_FIXED = 0x10 - _MADV_DONTNEED = 0x4 + _MADV_DONTNEED = 0x4 + _MADV_HUGEPAGE = 0xe + _MADV_NOHUGEPAGE = 0xf _SA_RESTART = 0x10000000 _SA_ONSTACK = 0x8000000 |