From: Jordan Rhee Date: Tue, 11 Dec 2018 22:57:59 +0000 (-0800) Subject: runtime/pprof: fix TestCPUProfileWithFork on Windows/ARM X-Git-Tag: go1.12beta1~100 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=da6294a35abfb62825da3e27b8ba998e71a4d81d;p=gostls13.git runtime/pprof: fix TestCPUProfileWithFork on Windows/ARM Use smaller heap on Windows/ARM, which generally does not have page file enabled and therefore has limited virtual address space. Updates #26148 Signed-off-by: Jordan Rhee Change-Id: I4030be24a10fab7b9b659e3736b7e83f10710bfa Reviewed-on: https://go-review.googlesource.com/c/153719 Run-TryBot: Hyang-Ah Hana Kim Reviewed-by: Ian Lance Taylor --- diff --git a/src/runtime/pprof/pprof_test.go b/src/runtime/pprof/pprof_test.go index a1089c8fdf..6d82b69a9d 100644 --- a/src/runtime/pprof/pprof_test.go +++ b/src/runtime/pprof/pprof_test.go @@ -321,6 +321,10 @@ func TestCPUProfileWithFork(t *testing.T) { // Use smaller size for Android to avoid crash. heap = 100 << 20 } + if runtime.GOOS == "windows" && runtime.GOARCH == "arm" { + // Use smaller heap for Windows/ARM to avoid crash. + heap = 100 << 20 + } if testing.Short() { heap = 100 << 20 }