MCPcopy Create free account
hub / github.com/dispatchrun/wzprof / MemoryProfiler

Struct MemoryProfiler

mem.go:27–33  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

25// the program, while "inuse_objects" and "inuse_space" capture the current state
26// of the program at the time the profile is taken.
27type 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.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected