runtime: add MemStats.TotalAlloc

This commit is contained in:
Damian Gryski
2022-08-09 14:03:19 -07:00
committed by Ron Evans
parent b56baa7aad
commit a87e5cdbf0
5 changed files with 17 additions and 1 deletions
+7
View File
@@ -35,6 +35,13 @@ type MemStats struct {
// HeapReleased is bytes of physical memory returned to the OS.
HeapReleased uint64
// TotalAlloc is cumulative bytes allocated for heap objects.
//
// TotalAlloc increases as heap objects are allocated, but
// unlike Alloc and HeapAlloc, it does not decrease when
// objects are freed.
TotalAlloc uint64
// Off-heap memory statistics.
//
// The following statistics measure runtime-internal