summaryrefslogtreecommitdiff
path: root/test/mallocrep.go
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2010-03-24 09:40:09 -0700
committerRuss Cox <rsc@golang.org>2010-03-24 09:40:09 -0700
commit0b6984f741e9ddb628b5ad718682e58da48c707d (patch)
tree881a840ee1f85e3047ae2629fbe9db5f448d3411 /test/mallocrep.go
parent10fabceda7fd8fab6adf4aa8db16d24ba5d3a730 (diff)
downloadgolang-0b6984f741e9ddb628b5ad718682e58da48c707d.tar.gz
runtime: malloc sampling, pprof interface
R=r CC=golang-dev http://codereview.appspot.com/719041
Diffstat (limited to 'test/mallocrep.go')
-rw-r--r--test/mallocrep.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/mallocrep.go b/test/mallocrep.go
index 5e1314ef5..ab49aae88 100644
--- a/test/mallocrep.go
+++ b/test/mallocrep.go
@@ -30,8 +30,9 @@ func bigger() {
}
func main() {
- flag.Parse()
+ runtime.MemProfileRate = 0 // disable profiler
runtime.MemStats.Alloc = 0 // ignore stacks
+ flag.Parse()
for i := 0; i < 1<<7; i++ {
for j := 1; j <= 1<<22; j <<= 1 {
if i == 0 && *chatty {