diff options
Diffstat (limited to 'src/internal')
| -rw-r--r-- | src/internal/profilerecord/profilerecord.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/internal/profilerecord/profilerecord.go b/src/internal/profilerecord/profilerecord.go index a5efdced8f..95581867e1 100644 --- a/src/internal/profilerecord/profilerecord.go +++ b/src/internal/profilerecord/profilerecord.go @@ -13,12 +13,12 @@ type StackRecord struct { } type MemProfileRecord struct { - AllocBytes, FreeBytes int64 + ObjectSize int64 AllocObjects, FreeObjects int64 Stack []uintptr } -func (r *MemProfileRecord) InUseBytes() int64 { return r.AllocBytes - r.FreeBytes } +func (r *MemProfileRecord) InUseBytes() int64 { return r.InUseObjects() * r.ObjectSize } func (r *MemProfileRecord) InUseObjects() int64 { return r.AllocObjects - r.FreeObjects } type BlockProfileRecord struct { |
