diff options
Diffstat (limited to 'libgo/go/runtime/pprof/pprof.go')
-rw-r--r-- | libgo/go/runtime/pprof/pprof.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libgo/go/runtime/pprof/pprof.go b/libgo/go/runtime/pprof/pprof.go index d14bb141c4a..a8e78e0ea75 100644 --- a/libgo/go/runtime/pprof/pprof.go +++ b/libgo/go/runtime/pprof/pprof.go @@ -75,7 +75,8 @@ func WriteHeapProfile(w io.Writer) error { // Print memstats information too. // Pprof will ignore, but useful for people. - s := &runtime.MemStats + s := new(runtime.MemStats) + runtime.ReadMemStats(s) fmt.Fprintf(b, "\n# runtime.MemStats\n") fmt.Fprintf(b, "# Alloc = %d\n", s.Alloc) fmt.Fprintf(b, "# TotalAlloc = %d\n", s.TotalAlloc) |