mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
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>
16 lines
404 B
Go
16 lines
404 B
Go
// Copyright 2011 The Go Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
package runtime
|
|
|
|
const (
|
|
thechar = '6'
|
|
_BigEndian = 0
|
|
_CacheLineSize = 64
|
|
_RuntimeGogoBytes = 80 + (goos_solaris)*16
|
|
_PhysPageSize = 4096
|
|
_PCQuantum = 1
|
|
_Int64Align = 8
|
|
hugePageSize = 1 << 21
|
|
)
|