Fixes #6553.
R=golang-dev, mikioh.mikioh
CC=golang-dev
https://golang.org/cl/
14526048
t.Skipf("skipping test on %q/%q", runtime.GOOS, runtime.GOARCH)
}
- const loops = 10
+ maxprocs := runtime.GOMAXPROCS(0)
+ loops := 10 + maxprocs
// 500 is enough to turn over the chunk of pollcache.
// See allocPollDesc in runtime/netpoll.goc.
const count = 500
failcount++
}
// there are always some allocations on the first loop
- if failcount > 3 {
+ if failcount > maxprocs+2 {
t.Error("detected possible memory leak in runtime")
t.FailNow()
}