Skip to content

Commit

Permalink
runtime: add HeapAlloc to gc_leaking
Browse files Browse the repository at this point in the history
  • Loading branch information
dgryski committed Oct 9, 2024
1 parent 62c1555 commit 87c6e19
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/runtime/gc_leaking.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ func ReadMemStats(m *MemStats) {
m.Mallocs = gcMallocs
m.Frees = gcFrees
m.Sys = uint64(heapEnd - heapStart)
// no free -- current in use heap is the total allocated
m.HeapAlloc = gcTotalAlloc
m.Alloc = m.HeapAlloc
}

func GC() {
Expand Down

0 comments on commit 87c6e19

Please sign in to comment.