mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-14 16:03:41 +00:00
src/runtime: add MemStats.HeapObjects
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user