aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/mem_linux.go
diff options
context:
space:
mode:
authorMichael Anthony Knyszek <mknyszek@google.com>2022-11-02 16:47:09 +0000
committerGopher Robot <gobot@golang.org>2023-04-05 21:43:42 +0000
commit84eaceaba706f55ed750149fcfbd6e59c78d60d8 (patch)
tree32e9cf214be1a17a234cb9e2c204502d934d2364 /src/runtime/mem_linux.go
parent76ac54b50ea39bbb1389ecfed71f4f0991cb4289 (diff)
downloadgo-84eaceaba706f55ed750149fcfbd6e59c78d60d8.tar.xz
runtime: add sysNoHugePage
Change-Id: Icccafb896de838256a2ec7c3f385e6cbb2b415fa Reviewed-on: https://go-review.googlesource.com/c/go/+/447360 Auto-Submit: Michael Knyszek <mknyszek@google.com> Reviewed-by: Michael Pratt <mpratt@google.com> Run-TryBot: Michael Knyszek <mknyszek@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
Diffstat (limited to 'src/runtime/mem_linux.go')
-rw-r--r--src/runtime/mem_linux.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/runtime/mem_linux.go b/src/runtime/mem_linux.go
index 1630664cff..96e890eedb 100644
--- a/src/runtime/mem_linux.go
+++ b/src/runtime/mem_linux.go
@@ -161,6 +161,10 @@ func sysHugePageOS(v unsafe.Pointer, n uintptr) {
}
}
+func sysNoHugePageOS(v unsafe.Pointer, n uintptr) {
+ madvise(v, n, _MADV_NOHUGEPAGE)
+}
+
// Don't split the stack as this function may be invoked without a valid G,
// which prevents us from allocating more stack.
//