MemoryProfiler is the implementation of a performance profiler recording samples of memory allocation and utilization. The profiler generates the following samples: - "alloc_objects" records the locations where objects are allocated - "alloc_space" records the locations where bytes are allocated
| 25 | // the program, while "inuse_objects" and "inuse_space" capture the current state |
| 26 | // of the program at the time the profile is taken. |
| 27 | type MemoryProfiler struct { |
| 28 | p *Profiling |
| 29 | mutex sync.Mutex |
| 30 | alloc stackCounterMap |
| 31 | inuse map[uint32]memoryAllocation |
| 32 | start time.Time |
| 33 | } |
| 34 | |
| 35 | // MemoryProfilerOption is a type used to represent configuration options for |
| 36 | // MemoryProfiler instances created by NewMemoryProfiler. |
nothing calls this directly
no outgoing calls
no test coverage detected