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
+7
View File
@@ -53,6 +53,13 @@ type MemStats struct {
// HeapReleased is bytes of physical memory returned to the OS.
HeapReleased uint64
// HeapObjects is the number of allocated heap objects.
//
// Like HeapAlloc, this increases as objects are allocated and
// decreases as the heap is swept and unreachable objects are
// freed.
HeapObjects uint64
// TotalAlloc is cumulative bytes allocated for heap objects.
//
// TotalAlloc increases as heap objects are allocated, but