Skip to content

Commit 87c6e19

Browse files
committed
runtime: add HeapAlloc to gc_leaking
1 parent 62c1555 commit 87c6e19

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/runtime/gc_leaking.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,9 @@ func ReadMemStats(m *MemStats) {
7979
m.Mallocs = gcMallocs
8080
m.Frees = gcFrees
8181
m.Sys = uint64(heapEnd - heapStart)
82+
// no free -- current in use heap is the total allocated
83+
m.HeapAlloc = gcTotalAlloc
84+
m.Alloc = m.HeapAlloc
8285
}
8386

8487
func GC() {

0 commit comments

Comments
 (0)