commit | 226fb099d9c1f81296ba4395c839c52875c0b7be | [log] [tgz] |
---|---|---|
author | Russ Cox <rsc@golang.org> | Fri Jul 22 00:55:01 2011 -0400 |
committer | Russ Cox <rsc@golang.org> | Fri Jul 22 00:55:01 2011 -0400 |
tree | 4eed4ad4f65902a8aec9b834cbd404dc64439832 | |
parent | 222450addb95c1b9264be28d77cc9da8a73b5647 [diff] [blame] |
runtime: add UpdateMemStats, use in tests Drops mallocrep1.go back to a reasonable amount of time. (154 -> 0.8 seconds on my Mac) Fixes #2085. R=golang-dev, dvyukov, r CC=golang-dev https://golang.org/cl/4811045
diff --git a/test/gc2.go b/test/gc2.go index c5c6cbe..c54d807 100644 --- a/test/gc2.go +++ b/test/gc2.go
@@ -32,7 +32,8 @@ } } } - + + runtime.UpdateMemStats() obj := runtime.MemStats.HeapObjects - st.HeapObjects if obj > N/5 { fmt.Println("too many objects left:", obj)