runtime: add MemStats.Mallocs and Frees

This commit is contained in:
Damian Gryski
2022-08-09 22:52:24 -07:00
committed by Ron Evans
parent a87e5cdbf0
commit 697e8c725b
6 changed files with 25 additions and 1 deletions
+2
View File
@@ -15,5 +15,7 @@ func ReadMemStats(m *MemStats) {
m.HeapSys = m.HeapInuse + m.HeapIdle
m.GCSys = 0
m.TotalAlloc = gcTotalAlloc
m.Mallocs = gcMallocs
m.Frees = gcFrees
m.Sys = uint64(heapEnd - heapStart)
}