mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-09-01 10:19:01 +00:00
src/runtime: add MemStats.HeapObjects
This commit is contained in:
@@ -827,6 +827,7 @@ func ReadMemStats(m *MemStats) {
|
||||
liveBytes := uint64(liveBlocks * bytesPerBlock)
|
||||
m.HeapInuse = liveBytes
|
||||
m.HeapAlloc = liveBytes
|
||||
m.HeapObjects = uint64(liveHeads)
|
||||
m.Alloc = liveBytes
|
||||
|
||||
// Subtract live blocks from total blocks to count free blocks.
|
||||
|
||||
Reference in New Issue
Block a user