]> Cypherpunks repositories - gostls13.git/commitdiff
runtime/pprof: fix TestCPUProfileWithFork on Windows/ARM
authorJordan Rhee <jordanrh@microsoft.com>
Tue, 11 Dec 2018 22:57:59 +0000 (14:57 -0800)
committerIan Lance Taylor <iant@golang.org>
Wed, 12 Dec 2018 01:36:16 +0000 (01:36 +0000)
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 <jordanrh@microsoft.com>
Change-Id: I4030be24a10fab7b9b659e3736b7e83f10710bfa
Reviewed-on: https://go-review.googlesource.com/c/153719
Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/runtime/pprof/pprof_test.go

index a1089c8fdf90d50467e1ba3e6f884e8b8cbfca21..6d82b69a9d549d16d45ebd744ae56d0c1363c735 100644 (file)
@@ -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
        }