Skip to content

Commit

Permalink
runtime: document MemStats.BySize fields
Browse files Browse the repository at this point in the history
Change-Id: Iae8cdcd84e9b5f5d7c698abc6da3fc2af0ef839a
Reviewed-on: https://go-review.googlesource.com/34710
Reviewed-by: Hyang-Ah Hana Kim <[email protected]>
  • Loading branch information
aclements committed Dec 23, 2016
1 parent c8f1436 commit a3f4cc0
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions src/runtime/mstats.go
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ type MemStats struct {
Lookups uint64

// Mallocs is the cumulative count of heap objects allocated.
// The number of live objects is Mallocs - Frees.
Mallocs uint64

// Frees is the cumulative count of heap objects freed.
Expand Down Expand Up @@ -397,9 +398,19 @@ type MemStats struct {
//
// This does not report allocations larger than BySize[60].Size.
BySize [61]struct {
Size uint32
// Size is the maximum byte size of an object in this
// size class.
Size uint32

// Mallocs is the cumulative count of heap objects
// allocated in this size class. The cumulative bytes
// of allocation is Size*Mallocs. The number of live
// objects in this size class is Mallocs - Frees.
Mallocs uint64
Frees uint64

// Frees is the cumulative count of heap objects freed
// in this size class.
Frees uint64
}
}

Expand Down

0 comments on commit a3f4cc0

Please sign in to comment.