An out-of-memory error in this test has been observed on 32-bit
platforms, so halve the memory footprint of the test. Also halve the
size of steady-state allocation rate in bytes. The end result should be
approximately the same GC CPU load but at half the memory usage.
Change-Id: I2c2d335da7dc4c5c58cb9d92b6e5a4ece55d24a8
Reviewed-on: https://go-review.googlesource.com/c/go/+/542215
Auto-Submit: Michael Knyszek <mknyszek@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
}
}
-var trees [32]*node
-var ballast *[32]*[8192]*node
+var trees [16]*node
+var ballast *[16]*[8192]*node
var sink []byte
func main() {
for i := range trees {
trees[i] = makeTree(6)
}
- ballast = new([32]*[8192]*node)
+ ballast = new([16]*[8192]*node)
for i := range ballast {
ballast[i] = new([8192]*node)
for j := range ballast[i] {
for i := 0; i < runtime.GOMAXPROCS(-1); i++ {
go func() {
for {
- sink = make([]byte, rand.Intn(65536))
+ sink = make([]byte, rand.Intn(32<<10))
}
}()
}