src/runtime: add MemStats.HeapObjects

This commit is contained in:
Damian Gryski
2026-01-08 12:42:28 -08:00
committed by Ron Evans
parent c8b56bd161
commit 9bc5d21185
3 changed files with 9 additions and 0 deletions
+1
View File
@@ -96,6 +96,7 @@ func ReadMemStats(m *MemStats) {
m.Sys = uint64(heapEnd - heapStart)
// no free -- current in use heap is the total allocated
m.HeapAlloc = gcTotalAlloc
m.HeapObjects = gcMallocs
m.Alloc = m.HeapAlloc
gcLock.Unlock()