src/runtime/testdata/testprog/syscall_windows.go | 5 ++++- src/runtime/testdata/testprogcgo/stack_windows.go | 5 ++++- diff --git a/src/runtime/testdata/testprog/syscall_windows.go b/src/runtime/testdata/testprog/syscall_windows.go index b4b66441b834a41a49b99a45dad1e2c0df049fb0..71bf384dc10a0dfb7ad6277efc7dc8525231f683 100644 --- a/src/runtime/testdata/testprog/syscall_windows.go +++ b/src/runtime/testdata/testprog/syscall_windows.go @@ -66,5 +66,8 @@ mem2, err := getPagefileUsage() if err != nil { panic(err) } - print((mem2 - mem1) / threadCount) + // assumes that this process creates 1 thread for each + // thread locked goroutine plus extra 5 threads + // like sysmon and others + print((mem2 - mem1) / (threadCount + 5)) } diff --git a/src/runtime/testdata/testprogcgo/stack_windows.go b/src/runtime/testdata/testprogcgo/stack_windows.go index 846297a960c4b9ff1328b5cfb7b9cce88abe53c4..0be1126bee93df6245268343b3d0749cfb9675b6 100644 --- a/src/runtime/testdata/testprogcgo/stack_windows.go +++ b/src/runtime/testdata/testprogcgo/stack_windows.go @@ -50,5 +50,8 @@ mem2, err := getPagefileUsage() if err != nil { panic(err) } - print((mem2 - mem1) / threadCount) + // assumes that this process creates 1 thread for each + // thread locked goroutine plus extra 5 threads + // like sysmon and others + print((mem2 - mem1) / (threadCount + 5)) }